function Text::render

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::render()
  2. 8.9.x core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::render()
  3. 10 core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::render()

Overrides AreaPluginBase::render

File

core/modules/views/src/Plugin/views/area/Text.php, line 60

Class

Text
Views area text handler.

Namespace

Drupal\views\Plugin\views\area

Code

public function render($empty = FALSE) {
    $format = $this->options['content']['format'] ?? filter_default_format();
    if (!$empty || !empty($this->options['empty'])) {
        return [
            '#type' => 'processed_text',
            '#text' => $this->tokenizeValue($this->options['content']['value']),
            '#format' => $format,
        ];
    }
    return [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.