Prado\Web\UI\ActiveControls\TCallbackPageStateTracker::addStatesToTrack PHP Method

addStatesToTrack() protected method

The value should be an array with two enteries. The first entery is the name of the class that will calculate the state differences. The second entry is a php function/method callback that handles the changes in the viewstate.
protected addStatesToTrack ( )
    protected function addStatesToTrack()
    {
        $states = $this->getStatesToTrack();
        $states['Visible'] = array('TScalarDiff', array($this, 'updateVisible'));
        $states['Enabled'] = array('TScalarDiff', array($this, 'updateEnabled'));
        $states['Attributes'] = array('TMapCollectionDiff', array($this, 'updateAttributes'));
        $states['Style'] = array('TStyleDiff', array($this, 'updateStyle'));
        $states['TabIndex'] = array('TScalarDiff', array($this, 'updateTabIndex'));
        $states['ToolTip'] = array('TScalarDiff', array($this, 'updateToolTip'));
        $states['AccessKey'] = array('TScalarDiff', array($this, 'updateAccessKey'));
    }

Usage Example

 /**
  * Add the {@link TJuiControlOptions} to the states to track.
  */
 protected function addStatesToTrack()
 {
     parent::addStatesToTrack();
     $states = $this->getStatesToTrack();
     $states['JuiOptions'] = array('TMapCollectionDiff', array($this, 'updateJuiOptions'));
 }