| 1 | <?php |
||
| 10 | class FieldDependency implements RuleCondition |
||
| 11 | { |
||
| 12 | const FIELD_VALID = '='; |
||
| 13 | const FIELD_INVALID = '!'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Dependent field |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | public $field; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | public $condition; |
||
| 25 | |||
| 26 | public function __construct($field, $condition = self::FIELD_VALID) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | public function macro() |
||
| 39 | } |
||
| 40 |