You are here

public function BatEventHandlerEventTypeField::render in Booking and Availability Management Tools for Drupal 8

Renders the field.

Parameters

\Drupal\views\ResultRow $values: The values retrieved from a single row of a view's query result.

Return value

string|\Drupal\Component\Render\MarkupInterface The rendered output. If the output is safe it will be wrapped in an object that implements MarkupInterface. If it is empty or unsafe it will be a string.

Overrides FieldPluginBase::render

File

modules/bat_event/src/Plugin/views/field/BatEventHandlerEventTypeField.php, line 19
Contains a Views field handler to take care of displaying the correct label for event bundles.

Class

BatEventHandlerEventTypeField
Plugin annotation @ViewsField("bat_event_handler_event_type_field");

Namespace

Drupal\bat_event\Plugin\views\field

Code

public function render(ResultRow $values) {
  $event_type = bat_event_type_load($this
    ->getValue($values));
  return $event_type
    ->label();
}