Prado\Web\UI\TControl::setControlState PHP Method

setControlState() protected method

This function is very useful in defining setter functions for control properties that must be kept in controlstate. Make sure that the controlstate value must be serializable and unserializable.
protected setControlState ( $key, $value, $defaultValue = null )
    protected function setControlState($key, $value, $defaultValue = null)
    {
        if ($value === $defaultValue) {
            unset($this->_rf[self::RF_CONTROLSTATE][$key]);
        } else {
            $this->_rf[self::RF_CONTROLSTATE][$key] = $value;
        }
    }
TControl