1 | <?php |
||
26 | class SwitchType extends Action |
||
27 | { |
||
28 | use OrganizationSitesTrait, |
||
29 | OrganizationTabsTrait, |
||
30 | PopulateOrganizationTrait, |
||
31 | PopulateTrait, |
||
32 | LookupTrait, |
||
33 | CheckAccessTrait { |
||
34 | populate as parentPopulate; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param null $organization |
||
39 | * @return array|mixed |
||
40 | * @throws \Twig\Error\LoaderError |
||
41 | * @throws \Twig\Error\RuntimeError |
||
42 | * @throws \Twig\Error\SyntaxError |
||
43 | * @throws \craft\errors\SiteNotFoundException |
||
44 | * @throws \flipbox\craft\ember\exceptions\RecordNotFoundException |
||
45 | * @throws \yii\web\UnauthorizedHttpException |
||
46 | */ |
||
47 | public function run($organization = null) |
||
52 | |||
53 | /** |
||
54 | * @inheritdoc |
||
55 | * @return OrganizationElement |
||
56 | */ |
||
57 | protected function find($identifier) |
||
65 | |||
66 | /** |
||
67 | * @inheritdoc |
||
68 | * @return OrganizationElement |
||
69 | */ |
||
70 | protected function create() |
||
77 | |||
78 | /** |
||
79 | * @param OrganizationElement $element |
||
80 | * @return array|mixed |
||
81 | * @throws \Twig\Error\LoaderError |
||
82 | * @throws \Twig\Error\RuntimeError |
||
83 | * @throws \Twig\Error\SyntaxError |
||
84 | * @throws \craft\errors\SiteNotFoundException |
||
85 | * @throws \yii\web\UnauthorizedHttpException |
||
86 | */ |
||
87 | protected function runInternal(OrganizationElement $element) |
||
98 | |||
99 | /** |
||
100 | * @param OrganizationElement $element |
||
101 | * @return array |
||
102 | * @throws \Twig\Error\LoaderError |
||
103 | * @throws \Twig\Error\RuntimeError |
||
104 | * @throws \Twig\Error\SyntaxError |
||
105 | * @throws \craft\errors\SiteNotFoundException |
||
106 | */ |
||
107 | protected function data(OrganizationElement $element): array |
||
145 | |||
146 | /** |
||
147 | * @param OrganizationElement $element |
||
148 | * @return OrganizationElement |
||
149 | * @throws \Exception |
||
150 | */ |
||
151 | public function populate(OrganizationElement $element): OrganizationElement |
||
158 | } |
||
159 |