You are here

public function DisplayPluginBase::renderArea in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::renderArea()

Renders one of the available areas.

Parameters

string $area: Identifier of the specific area to render.

bool $empty: (optional) Indicator whether or not the view result is empty. Defaults to FALSE

Return value

array A render array for the given area.

Overrides DisplayPluginInterface::renderArea

File

core/modules/views/src/Plugin/views/display/DisplayPluginBase.php, line 2220
Contains \Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
Base class for views display plugins.

Namespace

Drupal\views\Plugin\views\display

Code

public function renderArea($area, $empty = FALSE) {
  $return = array();
  foreach ($this
    ->getHandlers($area) as $key => $area_handler) {
    if ($area_render = $area_handler
      ->render($empty)) {
      $return[$key] = $area_render;
    }
  }
  return $return;
}