1 | <?php |
||
27 | class Activation extends AbstractFormDefinitionComponent implements ActivationInterface, DataPreProcessorInterface |
||
28 | { |
||
29 | /** |
||
30 | * @var string |
||
31 | * @validate NotEmpty |
||
32 | */ |
||
33 | protected $expression; |
||
34 | |||
35 | /** |
||
36 | * @var \Romm\Formz\Condition\Items\ConditionItemInterface[] |
||
37 | * @mixedTypesResolver \Romm\Formz\Form\Definition\Condition\ConditionItemResolver |
||
38 | */ |
||
39 | protected $conditions = []; |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getExpression() |
||
48 | |||
49 | /** |
||
50 | * @param string $expression |
||
51 | */ |
||
52 | public function setExpression($expression) |
||
58 | |||
59 | /** |
||
60 | * @return ConditionItemInterface[] |
||
61 | */ |
||
62 | public function getConditions() |
||
66 | |||
67 | /** |
||
68 | * Returns the merged list of the conditions of this object and the |
||
69 | * conditions of the parent form. |
||
70 | * |
||
71 | * @return ConditionItemInterface[] |
||
72 | */ |
||
73 | public function getAllConditions() |
||
87 | |||
88 | /** |
||
89 | * @param string $name Name of the condition. |
||
90 | * @return bool |
||
91 | */ |
||
92 | public function hasCondition($name) |
||
98 | |||
99 | /** |
||
100 | * Return the condition with the given name. |
||
101 | * |
||
102 | * @param string $name Name of the item. |
||
103 | * @return ConditionItemInterface |
||
104 | * @throws EntryNotFoundException |
||
105 | */ |
||
106 | public function getCondition($name) |
||
116 | |||
117 | /** |
||
118 | * @param string $name |
||
119 | * @param string $identifier |
||
120 | * @param array $arguments |
||
121 | * @return ConditionItemInterface |
||
122 | * @throws DuplicateEntryException |
||
123 | * @throws EntryNotFoundException |
||
124 | */ |
||
125 | public function addCondition($name, $identifier, $arguments = []) |
||
145 | |||
146 | /** |
||
147 | * @return ActivationUsageInterface |
||
148 | */ |
||
149 | public function getRootObject() |
||
156 | |||
157 | /** |
||
158 | * @param DataPreProcessor $processor |
||
159 | */ |
||
160 | public static function dataPreProcessor(DataPreProcessor $processor) |
||
179 | } |
||
180 |