Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
booleanrule.php
1<?php
2
11
12class BooleanRule extends Rule
13{
14 protected $options = [
15 'type' => 'checkbox',
16 ];
17
24 public function __construct($title, bool $value = false, array $options = null)
25 {
26 parent::__construct($title, $value, $options);
27 }
28
32 public function compare($value): bool
33 {
34 return ($value && !$this->value);
35 }
36}
__construct($title, bool $value=false, array $options=null)