1 | <?php |
||
19 | trait MultiSiteElementAccessorTrait |
||
20 | { |
||
21 | use ElementAccessorTrait; |
||
22 | |||
23 | /** |
||
24 | * @param $identifier |
||
25 | * @param int|null $siteId |
||
26 | * @return array |
||
27 | */ |
||
28 | protected function identifierCondition($identifier, int $siteId = null): array |
||
43 | |||
44 | /******************************************* |
||
45 | * FIND / GET |
||
46 | *******************************************/ |
||
47 | |||
48 | /** |
||
49 | * @param int|null $siteId |
||
50 | * @return ElementInterface[] |
||
51 | */ |
||
52 | public function findAll(int $siteId = null) |
||
60 | |||
61 | /** |
||
62 | * @param $identifier |
||
63 | * @param int|null $siteId |
||
64 | * @return ElementInterface|null |
||
65 | */ |
||
66 | public function find($identifier, int $siteId = null) |
||
76 | |||
77 | /** |
||
78 | * @param $identifier |
||
79 | * @param int $siteId |
||
80 | * @return ElementInterface |
||
81 | * @throws ElementNotFoundException |
||
82 | */ |
||
83 | public function get($identifier, int $siteId = null): ElementInterface |
||
91 | } |
||
92 |