Contao\FormTextArea::__set PHP Метод

__set() публичный Метод

Add specific attributes
public __set ( string $strKey, mixed $varValue )
$strKey string The attribute name
$varValue mixed The attribute value
    public function __set($strKey, $varValue)
    {
        switch ($strKey) {
            case 'maxlength':
                if ($varValue > 0) {
                    $this->arrAttributes['maxlength'] = $varValue;
                }
                break;
            case 'mandatory':
                if ($varValue) {
                    $this->arrAttributes['required'] = 'required';
                } else {
                    unset($this->arrAttributes['required']);
                }
                parent::__set($strKey, $varValue);
                break;
            case 'placeholder':
                $this->arrAttributes['placeholder'] = $varValue;
                break;
            case 'size':
                $arrSize = \StringUtil::deserialize($varValue);
                $this->intRows = $arrSize[0];
                $this->intCols = $arrSize[1];
                break;
            case 'rows':
                $this->intRows = $varValue;
                break;
            case 'cols':
                $this->intCols = $varValue;
                break;
            default:
                parent::__set($strKey, $varValue);
                break;
        }
    }