1 | <?php |
||
25 | class FieldIsFilledCondition extends AbstractConditionItem |
||
26 | { |
||
27 | const CONDITION_IDENTIFIER = 'fieldIsFilled'; |
||
28 | |||
29 | /** |
||
30 | * @inheritdoc |
||
31 | * @var array |
||
32 | */ |
||
33 | protected static $javaScriptFiles = [ |
||
34 | 'EXT:formz/Resources/Public/JavaScript/Conditions/Formz.Condition.FieldIsFilled.js' |
||
35 | ]; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | * @validate NotEmpty |
||
40 | */ |
||
41 | protected $fieldName; |
||
42 | |||
43 | /** |
||
44 | * @param string $fieldName |
||
45 | */ |
||
46 | public function __construct($fieldName) |
||
50 | |||
51 | /** |
||
52 | * @inheritdoc |
||
53 | */ |
||
54 | public function getCssResult() |
||
60 | |||
61 | /** |
||
62 | * @inheritdoc |
||
63 | */ |
||
64 | public function getJavaScriptResult() |
||
68 | |||
69 | /** |
||
70 | * @inheritdoc |
||
71 | */ |
||
72 | public function getPhpResult(PhpConditionDataObject $dataObject) |
||
78 | |||
79 | /** |
||
80 | * Checks the condition configuration/options. |
||
81 | * |
||
82 | * If any syntax/configuration error is found, an exception of type |
||
83 | * `InvalidConditionException` must be thrown. |
||
84 | * |
||
85 | * @throws InvalidConditionException |
||
86 | */ |
||
87 | protected function checkConditionConfiguration() |
||
95 | } |
||
96 |