Prado\Web\UI\WebControls\TCheckBox::getValueAttribute PHP Méthode

getValueAttribute() protected méthode

protected getValueAttribute ( ) : string
Résultat string the value attribute to be rendered
    protected function getValueAttribute()
    {
        if (($value = $this->getValue()) !== '') {
            return $value;
        } else {
            $attributes = $this->getViewState('InputAttributes', null);
            if ($attributes && $attributes->contains('value')) {
                return $attributes->itemAt('value');
            } else {
                if ($this->hasAttribute('value')) {
                    return $this->getAttribute('value');
                } else {
                    return '';
                }
            }
        }
    }

Usage Example

Exemple #1
0
 /**
  * @return string the value attribute to be rendered
  */
 protected function getValueAttribute()
 {
     if (($value = parent::getValueAttribute()) === '') {
         return $this->getUniqueID();
     } else {
         return $value;
     }
 }