function Markup::init

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

Overrides FieldPluginBase::init

File

core/modules/views/src/Plugin/views/field/Markup.php, line 31

Class

Markup
Handler to run a field through check_markup, using a companion format field.

Namespace

Drupal\views\Plugin\views\field

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
    parent::init($view, $display, $options);
    $this->format = $this->definition['format'];
    $this->additional_fields = [];
    if (is_array($this->format)) {
        $this->additional_fields['format'] = $this->format;
    }
}

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