1 | <?php |
||
24 | class FieldCountValuesCondition extends AbstractConditionItem |
||
25 | { |
||
26 | const CONDITION_IDENTIFIER = 'fieldCountValues'; |
||
27 | |||
28 | /** |
||
29 | * @inheritdoc |
||
30 | * @var array |
||
31 | */ |
||
32 | protected static $javaScriptFiles = [ |
||
33 | 'EXT:formz/Resources/Public/JavaScript/Conditions/Formz.Condition.FieldCountValues.js' |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | * @validate NotEmpty |
||
39 | */ |
||
40 | protected $fieldName; |
||
41 | |||
42 | /** |
||
43 | * @var int |
||
44 | */ |
||
45 | protected $minimum; |
||
46 | |||
47 | /** |
||
48 | * @var int |
||
49 | */ |
||
50 | protected $maximum; |
||
51 | |||
52 | /** |
||
53 | * @param string $fieldName |
||
54 | * @param int $minimum |
||
55 | * @param int $maximum |
||
56 | */ |
||
57 | public function __construct($fieldName, $minimum = null, $maximum = null) |
||
63 | |||
64 | /** |
||
65 | * @inheritdoc |
||
66 | */ |
||
67 | public function getJavaScriptResult() |
||
75 | |||
76 | /** |
||
77 | * @inheritdoc |
||
78 | */ |
||
79 | public function getPhpResult(PhpConditionDataObject $dataObject) |
||
86 | |||
87 | /** |
||
88 | * @inheritdoc |
||
89 | * |
||
90 | * @throws InvalidConditionException |
||
91 | */ |
||
92 | protected function checkConditionConfiguration() |
||
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | public function getCssResult() |
||
108 | } |
||
109 |