You are here

public function FieldPluginBase::themeFunctions in Drupal 8

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

Provide a full list of possible theme templates used by this style.

Overrides PluginBase::themeFunctions

1 call to FieldPluginBase::themeFunctions()
FieldPluginBase::theme in core/modules/views/src/Plugin/views/field/FieldPluginBase.php
Passes values to drupal_render() using $this->themeFunctions() as #theme.

File

core/modules/views/src/Plugin/views/field/FieldPluginBase.php, line 1756

Class

FieldPluginBase
Base class for views fields.

Namespace

Drupal\views\Plugin\views\field

Code

public function themeFunctions() {
  $themes = [];
  $hook = 'views_view_field';
  $display = $this->view->display_handler->display;
  if (!empty($display)) {
    $themes[] = $hook . '__' . $this->view->storage
      ->id() . '__' . $display['id'] . '__' . $this->options['id'];
    $themes[] = $hook . '__' . $this->view->storage
      ->id() . '__' . $display['id'];
    $themes[] = $hook . '__' . $display['id'] . '__' . $this->options['id'];
    $themes[] = $hook . '__' . $display['id'];
    if ($display['id'] != $display['display_plugin']) {
      $themes[] = $hook . '__' . $this->view->storage
        ->id() . '__' . $display['display_plugin'] . '__' . $this->options['id'];
      $themes[] = $hook . '__' . $this->view->storage
        ->id() . '__' . $display['display_plugin'];
      $themes[] = $hook . '__' . $display['display_plugin'] . '__' . $this->options['id'];
      $themes[] = $hook . '__' . $display['display_plugin'];
    }
  }
  $themes[] = $hook . '__' . $this->view->storage
    ->id() . '__' . $this->options['id'];
  $themes[] = $hook . '__' . $this->view->storage
    ->id();
  $themes[] = $hook . '__' . $this->options['id'];
  $themes[] = $hook;
  return $themes;
}