function 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 2295  
Class
- DisplayPluginBase
 - Base class for views display plugins.
 
Namespace
Drupal\views\Plugin\views\displayCode
public function renderArea($area, $empty = FALSE) {
  $return = [];
  foreach ($this->getHandlers($area) as $key => $area_handler) {
    if ($area_render = $area_handler->render($empty)) {
      if (isset($area_handler->position)) {
        // Fix weight of area.
        $area_render['#weight'] = $area_handler->position;
      }
      $return[$key] = $area_render;
    }
  }
  return $return;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.