Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
gridstate.php
1
<?php
2
3
namespace
Bitrix\Catalog\Component\GridVariation
;
4
8
class
GridState
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
}
Bitrix\Catalog\Component\GridVariation\GridState
Definition
gridstate.php:9
Bitrix\Catalog\Component\GridVariation\GridState\getCurrentPage
getCurrentPage()
Definition
gridstate.php:49
Bitrix\Catalog\Component\GridVariation\GridState\setCurrentPage
setCurrentPage(int $page)
Definition
gridstate.php:61
Bitrix\Catalog\Component\GridVariation\GridState\getGridId
getGridId()
Definition
gridstate.php:39
Bitrix\Catalog\Component\GridVariation\GridState\getProductId
getProductId()
Definition
gridstate.php:29
Bitrix\Catalog\Component\GridVariation\GridState\reset
reset()
Definition
gridstate.php:71
Bitrix\Catalog\Component\GridVariation\GridState\__construct
__construct(int $productId, string $gridId)
Definition
gridstate.php:18
Bitrix\Catalog\Component\GridVariation\GridState\save
save()
Definition
gridstate.php:81
Bitrix\Catalog\Component\GridVariation\GridStateStorage
Definition
gridstatestorage.php:11
Bitrix\Catalog\Component\GridVariation
Definition
gridstate.php:3
modules
catalog
lib
component
gridvariation
gridstate.php
Создано системой
1.10.0