public function save()
 {
     $name = $this->getName();
     if (!Input::has($name)) {
         Input::merge([$name => 0]);
     }
     parent::save();
 }
Пример #2
0
 /**
  * @return array
  */
 public function getParams()
 {
     return parent::getParams() + ['options' => $this->getOptions(), 'nullable' => $this->isNullable()];
 }
Пример #3
0
 /**
  * @param string $attribute
  * @param mixed $value
  */
 protected function setValue($attribute, $value)
 {
     if ($this->isFilterHtml()) {
         // TODO: add filter html tags
     }
     parent::setValue($attribute, WYSIWYGHelper::applyFilter($this->getEditor(), $value));
 }
 /**
  * @return array
  */
 public function getParams()
 {
     return parent::getParams() + ['seconds' => $this->hasSeconds(), 'format' => $this->getFormat(), 'pickerFormat' => $this->getPickerFormat()];
 }