function Markup::elementType

Same name and namespace in other branches
  1. 8.9.x 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 57

Class

Markup
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.