1 layout_renderer_standard.inc LayoutRendererStandard::prepare()

Prepare the attached display for rendering.

This is the outermost prepare method. It calls several sub-methods as part of the overall preparation process. This compartmentalization is intended to ease the task of modifying renderer behavior in child classes.

If you override this method, it is important that you either call this method via parent::prepare(), or manually set $this->prep_run = TRUE.

File

core/modules/layout/plugins/renderers/layout_renderer_standard.inc, line 184

Class

LayoutRendererStandard
The standard render for a Layout display object.

Code

function prepare() {
  // Set the custom page title. Note this may be overridden in prepareBlocks()
  // by copying a title from a block.
  if ($this->layout->settings['title_display'] === LAYOUT_TITLE_CUSTOM) {
    $this->page_title = t($this->layout->settings['title']);
  }
  elseif ($this->layout->settings['title_display'] === LAYOUT_TITLE_NONE) {
    $this->page_title = FALSE;
  }

  $this->prepareBlocks($this->layout->content);
  $this->prepareRegions($this->layout->positions, $this->layout->settings);
  $this->prep_run = TRUE;
}