1 | <?php |
||
22 | trait ElementMutatorTrait |
||
23 | { |
||
24 | /** |
||
25 | * @var Element|null |
||
26 | */ |
||
27 | private $element; |
||
28 | |||
29 | /** |
||
30 | * @return bool |
||
31 | */ |
||
32 | public function isElementSet(): bool |
||
36 | |||
37 | /** |
||
38 | * Set associated elementId |
||
39 | * |
||
40 | * @param $id |
||
41 | * @return $this |
||
42 | */ |
||
43 | public function setElementId(int $id) |
||
48 | |||
49 | /** |
||
50 | * Get associated elementId |
||
51 | * |
||
52 | * @return int|null |
||
53 | */ |
||
54 | public function getElementId() |
||
62 | |||
63 | /** |
||
64 | * Associate a element |
||
65 | * |
||
66 | * @param mixed $element |
||
67 | * @return $this |
||
68 | */ |
||
69 | public function setElement($element = null) |
||
83 | |||
84 | /** |
||
85 | * @return ElementInterface|null |
||
86 | */ |
||
87 | public function getElement() |
||
106 | |||
107 | /** |
||
108 | * @return ElementInterface|null |
||
109 | */ |
||
110 | protected function resolveElement() |
||
118 | |||
119 | /** |
||
120 | * @return ElementInterface|null |
||
121 | */ |
||
122 | private function resolveElementFromId() |
||
130 | |||
131 | /** |
||
132 | * @param mixed $element |
||
133 | * @return ElementInterface|Element|null |
||
134 | */ |
||
135 | protected function internalResolveElement($element = null) |
||
151 | } |
||
152 |