Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
gridstate.php
1<?php
2
4
9{
10 private string $gridId;
11 private int $productId;
12 private int $currentPage;
13
18 public function __construct(int $productId, string $gridId)
19 {
20 $this->productId = $productId;
21 $this->gridId = $gridId;
22 }
23
29 public function getProductId(): int
30 {
31 return $this->productId;
32 }
33
39 public function getGridId(): string
40 {
41 return $this->gridId;
42 }
43
49 public function getCurrentPage(): int
50 {
51 return $this->currentPage ?? 1;
52 }
53
61 public function setCurrentPage(int $page): void
62 {
63 $this->currentPage = $page;
64 }
65
71 public function reset(): void
72 {
73 $this->currentPage = 1;
74 }
75
81 public function save(): void
82 {
83 (new GridStateStorage)->save($this);
84 }
85}
__construct(int $productId, string $gridId)
Definition gridstate.php:18