Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
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
Definition
basefilter.php:14
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter
Definition
storesalefilter.php:9
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getFieldsList
static getFieldsList()
Definition
storesalefilter.php:22
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getProductFilterContext
static getProductFilterContext()
Definition
storesalefilter.php:17
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getReportIntervalField
static getReportIntervalField()
Definition
storesalefilter.php:35
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getPresetsList
static getPresetsList()
Definition
storesalefilter.php:64
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\REPORT_INTERVAL_FIELD_NAME
const REPORT_INTERVAL_FIELD_NAME
Definition
storesalefilter.php:10
Bitrix\Catalog\Integration\Report\Filter\StoreSaleFilter\getStoreFilterContext
static getStoreFilterContext()
Definition
storesalefilter.php:12
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\UI\Filter\DateType
Definition
datetype.php:11
Bitrix\Catalog\Integration\Report\Filter
Definition
basefilter.php:3
modules
catalog
lib
integration
report
filter
storesalefilter.php
Создано системой
1.10.0