yii\base\View::beginContent PHP Method

beginContent() public method

This method can be used to implement nested layout. For example, a layout can be embedded in another layout file specified as '@app/views/layouts/base.php' like the following: php beginContent('@app/views/layouts/base.php'); ?> ...layout content here... endContent(); ?>
See also: ContentDecorator
public beginContent ( string $viewFile, array $params = [] ) : yii\widgets\ContentDecorator
$viewFile string the view file that will be used to decorate the content enclosed by this widget. This can be specified as either the view file path or path alias.
$params array the variables (name => value) to be extracted and made available in the decorative view.
return yii\widgets\ContentDecorator the ContentDecorator widget instance
    public function beginContent($viewFile, $params = [])
    {
        return ContentDecorator::begin(['viewFile' => $viewFile, 'params' => $params, 'view' => $this]);
    }