You are here

public function TestExample::render in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php \Drupal\views_test_data\Plugin\views\area\TestExample::render()

Render the area.

Parameters

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

Return value

array In any case we need a valid Drupal render array to return.

Overrides AreaPluginBase::render

File

core/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php, line 52
Contains \Drupal\views_test_data\Plugin\views\area\TestExample.

Class

TestExample
Test area plugin.

Namespace

Drupal\views_test_data\Plugin\views\area

Code

public function render($empty = FALSE) {
  if (!$empty || !empty($this->options['empty'])) {
    return array(
      '#markup' => $this
        ->globalTokenReplace($this->options['string']),
    );
  }
  return array();
}