Ejemplo n.º 1
0
 /**
  * Sets the ID of the control that the label is associated with.
  * The control must be locatable via {@link TControl::findControl} using the ID.
  * On callback response, the For attribute of the label is updated.
  * @param string the associated control ID
  */
 public function setForControl($value)
 {
     parent::setForControl($value);
     if ($this->getActiveControl()->canUpdateClientSide()) {
         $id = $this->findControl($value)->getClientID();
         $this->getPage()->getCallbackClient()->setAttribute($this, 'for', $id);
     }
 }
Ejemplo n.º 2
0
 public function createLabel($s)
 {
     if ($this->_autoLabel) {
         $label = new TLabel();
         $label->setText($this->_headerText ? $this->_headerText : $this->_dataField);
         $label->setForControl($s);
         $this->getControls()->add($label);
     }
 }