You are here

public function TextCustom::render in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/area/TextCustom.php \Drupal\views\Plugin\views\area\TextCustom::render()
  2. 10 core/modules/views/src/Plugin/views/area/TextCustom.php \Drupal\views\Plugin\views\area\TextCustom::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/src/Plugin/views/area/TextCustom.php, line 42

Class

TextCustom
Views area text handler.

Namespace

Drupal\views\Plugin\views\area

Code

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