public static Views::getHandlerTypes()
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.
File
- core/modules/views/src/Views.php, line 422
Class
- Views
- Static service container wrapper for views.
Namespace
Drupal\views
Code
public static function getHandlerTypes() {
// Statically cache this so translation only occurs once per request for all
// of these values.
if (!isset(static::$handlerTypes)) {
static::$handlerTypes = array(
'field' => array(
// title
'title' => static::t('Fields'),
// Lowercase title for mid-sentence.
'ltitle' => static::t('fields'),
// Singular title.
'stitle' => static::t('Field'),
// Singular lowercase title for mid sentence
'lstitle' => static::t('field'),
'plural' => 'fields',
),
'argument' => array(
'title' => static::t('Contextual filters'),
'ltitle' => static::t('contextual filters'),
'stitle' => static::t('Contextual filter'),
'lstitle' => static::t('contextual filter'),
'plural' => 'arguments',
),
'sort' => array(
'title' => static::t('Sort criteria'),
'ltitle' => static::t('sort criteria'),
'stitle' => static::t('Sort criterion'),
'lstitle' => static::t('sort criterion'),
'plural' => 'sorts',
),
'filter' => array(
'title' => static::t('Filter criteria'),
'ltitle' => static::t('filter criteria'),
'stitle' => static::t('Filter criterion'),
'lstitle' => static::t('filter criterion'),
'plural' => 'filters',
),
'relationship' => array(
'title' => static::t('Relationships'),
'ltitle' => static::t('relationships'),
'stitle' => static::t('Relationship'),
'lstitle' => static::t('Relationship'),
'plural' => 'relationships',
),
'header' => array(
'title' => static::t('Header'),
'ltitle' => static::t('header'),
'stitle' => static::t('Header'),
'lstitle' => static::t('Header'),
'plural' => 'header',
'type' => 'area',
),
'footer' => array(
'title' => static::t('Footer'),
'ltitle' => static::t('footer'),
'stitle' => static::t('Footer'),
'lstitle' => static::t('Footer'),
'plural' => 'footer',
'type' => 'area',
),
'empty' => array(
'title' => static::t('No results behavior'),
'ltitle' => static::t('no results behavior'),
'stitle' => static::t('No results behavior'),
'lstitle' => static::t('No results behavior'),
'plural' => 'empty',
'type' => 'area',
),
);
}
return static::$handlerTypes;
}
Please login to continue.