1 | <?php |
||
29 | class ConditionNode extends AbstractNode implements ActivationDependencyAwareInterface |
||
30 | { |
||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $conditionName; |
||
35 | |||
36 | /** |
||
37 | * @var ConditionItemInterface |
||
38 | */ |
||
39 | protected $condition; |
||
40 | |||
41 | /** |
||
42 | * @var FormObject |
||
43 | */ |
||
44 | protected $formObject; |
||
45 | |||
46 | /** |
||
47 | * @var ActivationInterface |
||
48 | */ |
||
49 | protected $activation; |
||
50 | |||
51 | /** |
||
52 | * Constructor, which needs a name for the condition and an instance of a |
||
53 | * condition item. |
||
54 | * |
||
55 | * @param string $conditionName Name of the condition. |
||
56 | * @param ConditionItemInterface $condition Instance of the condition item. |
||
57 | */ |
||
58 | public function __construct($conditionName, ConditionItemInterface $condition) |
||
63 | |||
64 | /** |
||
65 | * @param ConditionProcessor $processor |
||
66 | * @param ActivationInterface $activation |
||
67 | */ |
||
68 | public function injectDependencies(ConditionProcessor $processor, ActivationInterface $activation) |
||
77 | |||
78 | /** |
||
79 | * @inheritdoc |
||
80 | */ |
||
81 | public function getCssResult() |
||
85 | |||
86 | /** |
||
87 | * @inheritdoc |
||
88 | */ |
||
89 | public function getJavaScriptResult() |
||
93 | |||
94 | /** |
||
95 | * @inheritdoc |
||
96 | */ |
||
97 | public function getPhpResult(PhpConditionDataObject $dataObject) |
||
103 | |||
104 | /** |
||
105 | * Validates the configuration of the condition instance. |
||
106 | * |
||
107 | * @see \Romm\Formz\Condition\Items\ConditionItemInterface::validateConditionConfiguration |
||
108 | */ |
||
109 | protected function checkConditionConfiguration() |
||
119 | |||
120 | /** |
||
121 | * @param InvalidConditionException $exception |
||
122 | * @throws InvalidConditionException |
||
123 | */ |
||
124 | protected function throwInvalidConditionException(InvalidConditionException $exception) |
||
138 | |||
139 | /** |
||
140 | * @return string |
||
141 | */ |
||
142 | public function getConditionName() |
||
146 | |||
147 | /** |
||
148 | * @return ConditionItemInterface |
||
149 | */ |
||
150 | public function getCondition() |
||
154 | |||
155 | public function __sleep() |
||
164 | |||
165 | /** |
||
166 | * @return FormObject |
||
167 | */ |
||
168 | protected function getFormObject() |
||
172 | |||
173 | /** |
||
174 | * @return ActivationUsageInterface |
||
175 | */ |
||
176 | protected function getRootObject() |
||
180 | } |
||
181 |