1 | <?php |
||
22 | trait FieldMutator |
||
23 | { |
||
24 | /** |
||
25 | * @var Field|null |
||
26 | */ |
||
27 | private $field; |
||
28 | |||
29 | /** |
||
30 | * Set associated fieldId |
||
31 | * |
||
32 | * @param $id |
||
33 | * @return $this |
||
34 | */ |
||
35 | public function setFieldId(int $id) |
||
40 | |||
41 | /** |
||
42 | * Get associated fieldId |
||
43 | * |
||
44 | * @return int|null |
||
45 | */ |
||
46 | public function getFieldId() |
||
54 | |||
55 | /** |
||
56 | * Associate a field |
||
57 | * |
||
58 | * @param mixed $field |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function setField($field = null) |
||
75 | |||
76 | /** |
||
77 | * @return FieldInterface|null |
||
78 | */ |
||
79 | public function getField() |
||
98 | |||
99 | /** |
||
100 | * @return FieldInterface|null |
||
101 | */ |
||
102 | protected function resolveField() |
||
110 | |||
111 | /** |
||
112 | * @return FieldInterface|null |
||
113 | */ |
||
114 | private function resolveFieldFromId() |
||
122 | |||
123 | /** |
||
124 | * @param mixed $field |
||
125 | * @return FieldInterface|Field|null |
||
126 | */ |
||
127 | protected function internalResolveField($field = null) |
||
143 | } |
||
144 |