Пример #1
0
 /**
  * Set the referenced input for this label.
  * @param AbstractFormControl $control_element that label should reference
  * @return $this
  */
 public function forControl(AbstractFormControl $control_element)
 {
     $this->for_control_element = $control_element;
     $this->withAttribute('for', function () {
         return $this->getControlElement()->getId();
     });
     $this->withDefaultContent(function () use($control_element) {
         return $control_element->getLabel();
     });
     return $this;
 }