Beispiel #1
0
 public function init()
 {
     if (!isset($this->fieldConfig['class'])) {
         $this->fieldConfig['class'] = ActiveField::className();
     }
     parent::init();
 }
Beispiel #2
0
 public function init()
 {
     if (!array_key_exists('style', $this->inputOptions)) {
         $this->inputOptions['style'] = 'height: 100px;';
     }
     parent::init();
     $this->textarea();
 }
 public function init()
 {
     if (!array_key_exists('style', $this->labelOptions)) {
         $this->labelOptions['style'] = 'font-weight: bold;';
     }
     parent::init();
     $this->checkbox();
 }
 public function init()
 {
     if (is_callable($this->items)) {
         $callableItems = $this->items;
         $this->items = $callableItems();
     }
     parent::init();
     $this->dropDownList($this->items, ['prompt' => '']);
 }
 public function init()
 {
     $this->inputOptions['maxlength'] = $this->size + 1;
     parent::init();
     if (!$this->readOnly) {
         $pluginOptions = array_merge(['allowPlus' => false, 'rightAlign' => false], $this->pluginOptions, ['alias' => 'decimal', 'allowMinus' => !$this->unsigned, 'integerDigits' => $this->unsigned ? $this->size - $this->scale : $this->size - $this->scale - 1, 'digits' => $this->scale]);
         $this->widget('yii\\widgets\\MaskedInput', ['clientOptions' => $pluginOptions, 'options' => $this->inputOptions]);
     }
 }
Beispiel #6
0
 public function init()
 {
     $this->inputOptions['maxlength'] = $this->size;
     parent::init();
 }
Beispiel #7
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     BraintreeAsset::register($this->getView());
     $this->fieldClass = ActiveField::className();
 }