Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
categoryprovider.php
1
<?php
2
namespace
Bitrix\Report\VisualConstructor\RuntimeProvider
;
3
4
use
Bitrix\Report\VisualConstructor\Category
;
5
use
Bitrix\Report\VisualConstructor\Internal\Manager\CategoryManager
;
6
12
class
CategoryProvider
extends
Base
13
{
14
18
protected
function
availableFilterKeys
()
19
{
20
return
array(
'primary'
,
'parent_keys'
);
21
}
22
26
protected
function
availableRelations
()
27
{
28
return
array(
'parent'
,
'children'
);
29
}
30
34
protected
function
getManagerInstance
()
35
{
36
return
CategoryManager::getInstance
();
37
}
38
42
protected
function
getEntitiesList
()
43
{
44
return
$this->
getManagerInstance
()->getCategoriesList();
45
}
46
50
protected
function
getIndices
()
51
{
52
return
$this->
getManagerInstance
()->getIndices();
53
}
54
58
protected
function
processWithParent
(
Category
$entity)
59
{
60
$categoryProvider =
new
CategoryProvider
();
61
$categoryProvider->addFilter(
'primary'
, $entity->
getParentKey
());
62
$categoryProvider->execute();
63
64
$entity->parent = $categoryProvider->getResults();
65
}
66
70
protected
function
processWithChildren
(
Category
$entity)
71
{
72
$categoryProvider =
new
CategoryProvider
();
73
$categoryProvider->addFilter(
'parent_keys'
, $entity->
getKey
());
74
$categoryProvider->addRelation(
'children'
);
75
$categoryProvider->execute();
76
77
$entity->children = $categoryProvider->getResults();
78
}
79
80
81
}
Bitrix\Report\VisualConstructor\Category
Definition
category.php:12
Bitrix\Report\VisualConstructor\Category\getParentKey
getParentKey()
Definition
category.php:21
Bitrix\Report\VisualConstructor\Category\getKey
getKey()
Definition
category.php:40
Bitrix\Report\VisualConstructor\Internal\Manager\Base\getInstance
static getInstance()
Definition
base.php:40
Bitrix\Report\VisualConstructor\Internal\Manager\CategoryManager
Definition
categorymanager.php:13
Bitrix\Report\VisualConstructor\RuntimeProvider\Base
Definition
base.php:14
Bitrix\Report\VisualConstructor\RuntimeProvider\CategoryProvider
Definition
categoryprovider.php:13
Bitrix\Report\VisualConstructor\RuntimeProvider\CategoryProvider\processWithParent
processWithParent(Category $entity)
Definition
categoryprovider.php:58
Bitrix\Report\VisualConstructor\RuntimeProvider\CategoryProvider\processWithChildren
processWithChildren(Category $entity)
Definition
categoryprovider.php:70
Bitrix\Report\VisualConstructor\RuntimeProvider\CategoryProvider\getIndices
getIndices()
Definition
categoryprovider.php:50
Bitrix\Report\VisualConstructor\RuntimeProvider\CategoryProvider\availableFilterKeys
availableFilterKeys()
Definition
categoryprovider.php:18
Bitrix\Report\VisualConstructor\RuntimeProvider\CategoryProvider\getEntitiesList
getEntitiesList()
Definition
categoryprovider.php:42
Bitrix\Report\VisualConstructor\RuntimeProvider\CategoryProvider\availableRelations
availableRelations()
Definition
categoryprovider.php:26
Bitrix\Report\VisualConstructor\RuntimeProvider\CategoryProvider\getManagerInstance
getManagerInstance()
Definition
categoryprovider.php:34
Bitrix\Report\VisualConstructor\RuntimeProvider
Definition
analyticboardbatchprovider.php:2
modules
report
lib
visualconstructor
runtimeprovider
categoryprovider.php
Создано системой
1.10.0