Prado\Web\UI\WebControls\TCheckBox::getLabelAttributes PHP Method

getLabelAttributes() public method

public getLabelAttributes ( ) : TMap
return TMap list of attributes to be rendered for label beside the checkbox
    public function getLabelAttributes()
    {
        if ($attributes = $this->getViewState('LabelAttributes', null)) {
            return $attributes;
        } else {
            $attributes = new TAttributeCollection();
            $this->setViewState('LabelAttributes', $attributes, null);
            return $attributes;
        }
    }

Usage Example

Beispiel #1
0
 /**
  * @return string checkbox label ID;
  */
 protected function getDefaultLabelID()
 {
     if ($attributes = $this->getViewState('LabelAttributes', null)) {
         return TCheckBox::getLabelAttributes()->itemAt('id');
     } else {
         return $this->getClientID() . '_label';
     }
 }