function Markup::elementType

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

Overrides FieldPluginBase::elementType

File

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

Class

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

Namespace

Drupal\views\Plugin\views\field

Code

public function elementType($none_supported = FALSE, $default_empty = FALSE, $inline = FALSE) {
    if ($inline) {
        return 'span';
    }
    if (isset($this->definition['element type'])) {
        return $this->definition['element type'];
    }
    return 'div';
}

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