コード例 #1
0
 public function renderLabel(IControl $control, array $attrs = [], $part = NULL)
 {
     if ($part !== NULL) {
         return $this->renderSingleLabel($control, $part)->addAttributes($attrs);
     }
     return parent::renderLabel($control, $attrs, $part);
 }
コード例 #2
0
 /** @inheritdoc */
 public function renderControl(IControl $control, array $attrs = [], $part = NULL, $renderedDescription = FALSE)
 {
     /** @var Html $el */
     $el = parent::renderControl($control, $attrs, $part, $renderedDescription);
     if ($el->getName() !== '' && !isset($attrs['no-form-control'])) {
         $el->appendAttribute('class', static::FORM_CONTROL_CLASS);
     }
     return $el;
 }