begin() public method

Renders the opening tag of the field container.
public begin ( ) : string
return string the rendering result.
Beispiel #1
0
 public function begin()
 {
     if ($this->collapsed == true) {
         $this->options["class"] .= " collapsed-box";
     }
     return parent::begin();
 }
 public function testBeginHasErrorAndRequired()
 {
     $this->helperModel->addError($this->attributeName, "Error Message");
     $this->helperModel->addRule($this->attributeName, 'required');
     $expectedValue = '<div class="form-group field-dynamicmodel-attributename required has-error">';
     $actualValue = $this->activeField->begin();
     $this->assertEquals($expectedValue, $actualValue);
 }
Beispiel #3
0
 public function begin()
 {
     $attribute = Html::getAttributeName($this->attribute);
     if ($this->model->hasErrors($attribute)) {
         $this->inputOptions['class'] .= ' uk-form-danger';
     }
     return parent::begin();
 }
 /**
  * @inheritdoc
  */
 public function begin()
 {
     if ($this->_hasFeedback) {
         Html::addCssClass($this->options, 'has-feedback');
     }
     return parent::begin();
 }
 /**
  * @inheritdoc
  */
 public function begin()
 {
     $result = parent::begin();
     return str_replace('<div', '<dl', $result);
 }
 public function begin()
 {
     $this->inputOptions['placeholder'] = 'Choose';
     $control = parent::begin() . "<span class = 'cloak' id = '" . $this->attribute . "-cloak'" . ($this->visible ? '' : 'hidden') . ">";
     return $control;
 }