Views::getAllViews

public static Views::getAllViews() Returns an array of all views as fully loaded $view objects. Return value \Drupal\views\Entity\View[] An array of loaded view entities. File core/modules/views/src/Views.php, line 244 Class Views Static service container wrapper for views. Namespace Drupal\views Code public static function getAllViews() { return \Drupal::entityManager()->getStorage('view')->loadMultiple(); }

Views::getApplicableViews

public static Views::getApplicableViews($type) Return a list of all view IDs and display IDs that have a particular setting in their display's plugin settings. array( array($view_id, $display_id), array($view_id, $display_id), ); Parameters string $type: A flag from the display plugin definitions (e.g, 'uses_menu_links'). Return value array A list of arrays containing the $view_id and $display_id. File core/modules/views/src/Views.php, line 205 Class Views Static service container w

Views::getDisabledViews

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

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); }

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::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::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::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::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::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 = \