ViewsAccess

Defines a Plugin annotation object for views access plugins. Hierarchy class \Drupal\Component\Annotation\Plugin implements AnnotationInterfaceclass \Drupal\views\Annotation\ViewsPluginAnnotationBase implements AnnotationInterfaceclass \Drupal\views\Annotation\ViewsAccess See also \Drupal\views\Plugin\views\access\AccessPluginBase Related topics Annotations Annotations for class discovery and metadata description. Views access plugins Plugins to handle access checking for views. File co

Views::viewsDataHelper

public static Views::viewsDataHelper() Returns the views data helper service. Return value \Drupal\views\ViewsData Returns a views data helper object. File core/modules/views/src/Views.php, line 67 Class Views Static service container wrapper for views. Namespace Drupal\views Code public static function viewsDataHelper() { return \Drupal::service('views.views_data_helper'); }

Views::viewsData

public static Views::viewsData() Returns the views data service. Return value \Drupal\views\ViewsData Returns a views data cache object. File core/modules/views/src/Views.php, line 57 Class Views Static service container wrapper for views. Namespace Drupal\views Code public static function viewsData() { return \Drupal::service('views.views_data'); }

Views::t

protected static Views::t($string, array $args = array(), array $options = array()) Translates a string to the current language or to a given language. See the t() documentation for details. File core/modules/views/src/Views.php, line 525 Class Views Static service container wrapper for views. Namespace Drupal\views Code protected static function t($string, array $args = array(), array $options = array()) { if (empty(static::$translationManager)) { static::$translationManager = \

Views::handlerManager

public static Views::handlerManager($type) Returns the plugin manager for a certain views handler type. Return value \Drupal\views\Plugin\ViewsHandlerManager File core/modules/views/src/Views.php, line 108 Class Views Static service container wrapper for views. Namespace Drupal\views Code public static function handlerManager($type) { return \Drupal::service('plugin.manager.views.' . $type); }

Views::getViewsAsOptions

public static Views::getViewsAsOptions($views_only = FALSE, $filter = 'all', $exclude_view = NULL, $optgroup = FALSE, $sort = FALSE) Returns an array of view as options array, that can be used by select, checkboxes and radios as #options. Parameters bool $views_only: If TRUE, only return views, not displays. string $filter: Filters the views on status. Can either be 'all' (default), 'enabled' or 'disabled' mixed $exclude_view: view or current display to exclude either a views object (containin

Views::getView

public static Views::getView($id) Loads a view from configuration and returns its executable object. Parameters string $id: The view ID to load. Return value \Drupal\views\ViewExecutable A view executable instance, from the loaded entity. File core/modules/views/src/Views.php, line 121 Class Views Static service container wrapper for views. Namespace Drupal\views Code public static function getView($id) { $view = \Drupal::service('entity.manager')->getStorage('view')->load($i

Views::getHandlerTypes

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 j

Views::getEnabledViews

public static Views::getEnabledViews() Returns an array of all enabled views. Return value \Drupal\views\Entity\View[] An array of loaded enabled view entities. File core/modules/views/src/Views.php, line 254 Class Views Static service container wrapper for views. Namespace Drupal\views Code public static function getEnabledViews() { $query = \Drupal::entityQuery('view') ->condition('status', TRUE) ->execute(); return \Drupal::entityManager()->getStorage('view')-

Views::getEnabledDisplayExtenders

public static Views::getEnabledDisplayExtenders() Gets enabled display extenders. File core/modules/views/src/Views.php, line 183 Class Views Static service container wrapper for views. Namespace Drupal\views Code public static function getEnabledDisplayExtenders() { $enabled = array_filter((array) \Drupal::config('views.settings')->get('display_extenders')); return array_combine($enabled, $enabled); }