コード例 #1
0
 /**
  * Begins the rendering of content that is to be decorated by the specified view.
  * 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 $this->beginContent('@app/views/layouts/base.php'); ?>
  * ...layout content here...
  * <?php $this->endContent(); ?>
  * ~~~
  *
  * @param string $viewFile 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.
  * @param array $params the variables (name => value) to be extracted and made available in the decorative view.
  * @return ContentDecorator the ContentDecorator widget instance
  * @see ContentDecorator
  */
 public function beginContent($viewFile, $params = [])
 {
     return ContentDecorator::begin(['viewFile' => $viewFile, 'params' => $params, 'view' => $this]);
 }