yii\base\View::beforeRender PHP Method

beforeRender() public method

The default implementation will trigger the [[EVENT_BEFORE_RENDER]] event. If you override this method, make sure you call the parent implementation first.
public beforeRender ( string $viewFile, array $params ) : boolean
$viewFile string the view file to be rendered.
$params array the parameter array passed to the [[render()]] method.
return boolean whether to continue rendering the view file.
    public function beforeRender($viewFile, $params)
    {
        $event = new ViewEvent(['viewFile' => $viewFile, 'params' => $params]);
        $this->trigger(self::EVENT_BEFORE_RENDER, $event);
        return $event->isValid;
    }