Пример #1
0
 public function __construct(Form $form, $name, $attributes = array())
 {
     $attributes['type'] = 'file';
     if (!empty($attributes['images'])) {
         $this->preview = $attributes['images'];
     }
     unset($attributes['images']);
     parent::__construct($form, $name, $attributes);
 }
Пример #2
0
 public function __construct(Form $form, $name, $attributes = array())
 {
     if (isset($attributes['value'])) {
         $this->valueIfChecked = $attributes['value'];
         unset($attributes['value']);
     }
     if (array_key_exists('hiddenInput', $attributes) && $attributes['hiddenInput'] == false) {
         $this->hiddenInput = false;
     }
     unset($attributes['hiddenInput']);
     parent::__construct($form, $name, $attributes);
 }