public static function ViewExecutable::viewsHandlerTypes

Provide a list of views handler types used in a view, with some information about them.

Return value

array An array of associative arrays containing:

  • title: The title of the handler type.
  • ltitle: The lowercase title of the handler type.
  • stitle: A singular title of the handler type.
  • lstitle: A singular lowercase title of the handler type.
  • plural: Plural version of the handler type.
  • (optional) type: The actual internal used handler type. This key is just used for header,footer,empty to link to the internal type: area.
24 calls to ViewExecutable::viewsHandlerTypes()
DisplayPluginBase::getHandlers in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Get a full array of handlers for $type. This caches them.
DisplayPluginBase::isIdentifierUnique in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Check if the provided identifier is unique.
DisplayPluginBase::validate in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
Make sure the display and all associated handlers are valid.
HandlerAllTest::testHandlers in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php
Tests most of the handlers.
HandlerBase::buildGroupByForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/HandlerBase.php
Provide a form for aggregation settings.

... See full list

File

drupal/core/modules/views/lib/Drupal/views/ViewExecutable.php, line 1941
Definition of Drupal\views\ViewExecutable.

Class

ViewExecutable
An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.

Namespace

Drupal\views

Code

public static function viewsHandlerTypes() {
  static $retval = NULL;

  // Statically cache this so t() doesn't run a bajillion times.
  if (!isset($retval)) {
    $retval = array(
      'field' => array(
        'title' => t('Fields'),
        // title
        'ltitle' => t('fields'),
        // lowercase title for mid-sentence
        'stitle' => t('Field'),
        // singular title
        'lstitle' => t('field'),
        // singular lowercase title for mid sentence
        'plural' => 'fields',
      ),
      'argument' => array(
        'title' => t('Contextual filters'),
        'ltitle' => t('contextual filters'),
        'stitle' => t('Contextual filter'),
        'lstitle' => t('contextual filter'),
        'plural' => 'arguments',
      ),
      'sort' => array(
        'title' => t('Sort criteria'),
        'ltitle' => t('sort criteria'),
        'stitle' => t('Sort criterion'),
        'lstitle' => t('sort criterion'),
        'plural' => 'sorts',
      ),
      'filter' => array(
        'title' => t('Filter criteria'),
        'ltitle' => t('filter criteria'),
        'stitle' => t('Filter criterion'),
        'lstitle' => t('filter criterion'),
        'plural' => 'filters',
      ),
      'relationship' => array(
        'title' => t('Relationships'),
        'ltitle' => t('relationships'),
        'stitle' => t('Relationship'),
        'lstitle' => t('Relationship'),
        'plural' => 'relationships',
      ),
      'header' => array(
        'title' => t('Header'),
        'ltitle' => t('header'),
        'stitle' => t('Header'),
        'lstitle' => t('Header'),
        'plural' => 'header',
        'type' => 'area',
      ),
      'footer' => array(
        'title' => t('Footer'),
        'ltitle' => t('footer'),
        'stitle' => t('Footer'),
        'lstitle' => t('Footer'),
        'plural' => 'footer',
        'type' => 'area',
      ),
      'empty' => array(
        'title' => t('No results behavior'),
        'ltitle' => t('no results behavior'),
        'stitle' => t('No results behavior'),
        'lstitle' => t('No results behavior'),
        'plural' => 'empty',
        'type' => 'area',
      ),
    );
  }
  return $retval;
}