1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
storesalefilter.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Catalog\Integration\Report\Filter;
4
5
use Bitrix\Main\Localization\Loc;
6
use Bitrix\Main\UI\Filter\DateType;
7
8
class
StoreSaleFilter
extends
BaseFilter
9
{
10
public
const
REPORT_INTERVAL_FIELD_NAME
=
'REPORT_INTERVAL'
;
11
12
protected
static
function
getStoreFilterContext
(): string
13
{
14
return
'report_store_sale_filter_stores'
;
15
}
16
17
protected
static
function
getProductFilterContext
(): string
18
{
19
return
'report_store_sale_filter_products'
;
20
}
21
22
public
static
function
getFieldsList
()
23
{
24
$fieldsList = parent::getFieldsList();
25
$fieldsList[static::REPORT_INTERVAL_FIELD_NAME] = static::getReportIntervalField();
26
27
return
$fieldsList;
28
}
29
35
public
static
function
getReportIntervalField
():
array
36
{
37
return
[
38
'id'
=> static::REPORT_INTERVAL_FIELD_NAME,
39
'name'
=> Loc::getMessage(
'SALE_FILTER_REPORT_INTERVAL_TITLE'
),
40
'default'
=>
true
,
41
'type'
=>
'date'
,
42
'required'
=>
true
,
43
'valueRequired'
=>
true
,
44
'exclude'
=> [
45
DateType::NONE,
46
DateType::CURRENT_DAY,
47
DateType::CURRENT_WEEK,
48
DateType::YESTERDAY,
49
DateType::TOMORROW,
50
DateType::PREV_DAYS,
51
DateType::NEXT_DAYS,
52
DateType::NEXT_WEEK,
53
DateType::NEXT_MONTH,
54
DateType::LAST_MONTH,
55
DateType::LAST_WEEK,
56
DateType::EXACT,
57
]
58
];
59
}
60
64
public
static
function
getPresetsList
()
65
{
66
$presets = [];
67
68
$presets[
'filter_last_month'
] = [
69
'name'
=> Loc::getMessage(
'SALE_FILTER_REPORT_INTERVAL_MONTH_PRESET_TITLE'
),
70
'fields'
=> [
71
static::REPORT_INTERVAL_FIELD_NAME .
'_datesel'
=> DateType::CURRENT_MONTH,
72
],
73
'default'
=>
true
,
74
];
75
76
return
$presets;
77
}
78
}
Bitrix\Catalog\Integration\Report\Filter\BaseFilter
Определения
basefilter.php:14
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter
Определения
storesalefilter.php:9
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getFieldsList
static getFieldsList()
Определения
storesalefilter.php:22
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getProductFilterContext
static getProductFilterContext()
Определения
storesalefilter.php:17
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getReportIntervalField
static getReportIntervalField()
Определения
storesalefilter.php:35
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getPresetsList
static getPresetsList()
Определения
storesalefilter.php:64
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\REPORT_INTERVAL_FIELD_NAME
const REPORT_INTERVAL_FIELD_NAME
Определения
storesalefilter.php:10
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getStoreFilterContext
static getStoreFilterContext()
Определения
storesalefilter.php:12
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
bitrix
modules
catalog
lib
integration
report
filter
storesalefilter.php
Создано системой
1.14.0