yii\base\View::init PHP Method

init() public method

Initializes the view component.
public init ( )
    public function init()
    {
        parent::init();
        if (is_array($this->theme)) {
            if (!isset($this->theme['class'])) {
                $this->theme['class'] = 'yii\\base\\Theme';
            }
            $this->theme = Yii::createObject($this->theme);
        } elseif (is_string($this->theme)) {
            $this->theme = Yii::createObject($this->theme);
        }
    }

Usage Example

 public function init()
 {
     parent::init();
     //        $this->roles = 'webadmin';
 }
All Usage Examples Of yii\base\View::init