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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | 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.