Пример #1
0
 /**
  * Sets the filter options for this item
  *
  * @param array		$filter
  *
  * @return void
  */
 public function setFilter($filter)
 {
     parent::setFilter($filter);
     $this->userOptions['value'] = $this->validator->arrayGet($filter, 'value', '');
     //if it isn't null, we have to check the 'true'/'false' string
     if ($this->userOptions['value'] !== '') {
         $this->userOptions['value'] = $this->userOptions['value'] === 'false' || !$this->userOptions['value'] ? 0 : 1;
     }
 }
Пример #2
0
 /**
  * Sets the filter options for this item
  *
  * @param array		$filter
  *
  * @return void
  */
 public function setFilter($filter)
 {
     parent::setFilter($filter);
     $this->userOptions['value'] = $this->getOption('value') === '' ? null : $this->getOption('value');
 }