| @@ 19-36 (lines=18) @@ | ||
| 16 | * Additional field to navigation relation query. |
|
| 17 | * @package samsoncms\api\query |
|
| 18 | */ |
|
| 19 | class FieldNavigation extends Relational |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * FieldNavigation constructor. |
|
| 23 | * @param array $filteringIDs Collection of entity identifiers for filtering |
|
| 24 | */ |
|
| 25 | public function __construct($filteringIDs = array()) |
|
| 26 | { |
|
| 27 | parent::__construct( |
|
| 28 | $GLOBALS['__core']->getContainer()->get('query'), |
|
| 29 | Field::ENTITY, |
|
| 30 | Field::F_PRIMARY, |
|
| 31 | Navigation::F_PRIMARY, |
|
| 32 | CMS::FIELD_NAVIGATION_RELATION_ENTITY, |
|
| 33 | $filteringIDs |
|
| 34 | ); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| @@ 19-37 (lines=19) @@ | ||
| 16 | * Material to navigation relation query. |
|
| 17 | * @package samsoncms\api |
|
| 18 | */ |
|
| 19 | class MaterialNavigation extends Relational |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * MaterialNavigation constructor |
|
| 23 | * @param array $filteringIDs Collection of entity identifiers for filtering |
|
| 24 | * @param string $identifier Entity identifier |
|
| 25 | */ |
|
| 26 | public function __construct($filteringIDs = array(), $identifier = Material::class) |
|
| 27 | { |
|
| 28 | parent::__construct( |
|
| 29 | $GLOBALS['__core']->getContainer()->get('query'), |
|
| 30 | $identifier, |
|
| 31 | Material::F_PRIMARY, |
|
| 32 | Navigation::F_PRIMARY, |
|
| 33 | CMS::MATERIAL_NAVIGATION_RELATION_ENTITY, |
|
| 34 | $filteringIDs |
|
| 35 | ); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||