You are here

public function Markup::elementType in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/field/Markup.php \Drupal\views\Plugin\views\field\Markup::elementType()

Returns an HTML element based upon the field's element type.

Parameters

bool $none_supported: Whether or not this HTML element is supported.

bool $default_empty: Whether or not this HTML element is empty by default.

bool $inline: Whether or not this HTML element is inline.

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';
}