public function loadState($statePath)
    {
        $filename = Yii::getAlias($statePath . $this->stateFilename() . '.php');
        if (is_readable($filename) === true) {
            $this->loadAttributesFromState(
                include($filename)
            );
            return true;
        } else {
            return false;
        }
    }
public function loadState($statePath)
    {
        $filename = Yii::getAlias($statePath . $this->stateFilename() . '.php');
        if (is_readable($filename) === true) {
            $this->loadAttributesFromState(
                include($filename)
            );
            return true;
        } else {
            return false;
        }
    }
public function loadState ( $ statePath ) { $ filename = Yii :: getAlias ( $ statePath . $ this -> stateFilename ( ) . '.php' ) ; if ( is_readable ( $ filename ) === true ) { $ this -> loadAttributesFromState ( include ( $ filename ) ) ; return true ; } else { return false ; } }
Loads state from file
@param string $statePath Path where model state files are stored.
@return bool result
Loads state from file