Views
class Views (View source)
Static service container wrapper for views.
Properties
| static protected TranslationInterface | $translationManager | The translation manager. |
|
| static protected array | $handlerTypes | A static cache for handler types data. |
|
| static protected array | $plugins | A list of all available views plugin types. |
Methods
Returns the views data helper service.
Returns the view executable factory service.
Returns the plugin manager for a certain views plugin type.
Returns the plugin manager for a certain views handler type.
Loads a view from configuration and returns its executable object.
Fetches a list of all base tables available.
Gets all the views plugin definitions.
Gets enabled display extenders.
Return a list of all view IDs and display IDs that have a particular setting in their display's plugin settings.
Returns an array of all views as fully loaded $view objects.
Returns an array of all enabled views.
Returns an array of all disabled views.
Returns an array of view as options array, that can be used by select, checkboxes and radios as #options.
Returns a list of plugins and metadata about them.
Provide a list of views handler types used in a view, with some information about them.
Returns a list of plugin types.
Translates a string to the current language or to a given language.
Details
static ViewsData
viewsData()
Returns the views data service.
static ViewsDataHelper
viewsDataHelper()
Returns the views data helper service.
static ViewExecutableFactory
executableFactory()
Returns the view executable factory service.
static Analyzer
analyzer()
Returns the view analyzer.
static ViewsPluginManager
pluginManager(string $type)
Returns the plugin manager for a certain views plugin type.
static ViewsHandlerManager
handlerManager($type)
Returns the plugin manager for a certain views handler type.
static ViewExecutable|null
getView(string $id)
Loads a view from configuration and returns its executable object.
static A
fetchPluginNames(string $type, string $key = NULL, array $base = [])
Fetches a list of all base tables available.
static array
getPluginDefinitions()
Gets all the views plugin definitions.
static
getEnabledDisplayExtenders()
Gets enabled display extenders.
static array
getApplicableViews(string $type)
Return a list of all view IDs and display IDs that have a particular setting in their display's plugin settings.
static View[]
getAllViews()
Returns an array of all views as fully loaded $view objects.
static View[]
getEnabledViews()
Returns an array of all enabled views.
static View[]
getDisabledViews()
Returns an array of all disabled views.
static array
getViewsAsOptions(bool $views_only = FALSE, string $filter = 'all', mixed $exclude_view = NULL, bool $optgroup = FALSE, bool $sort = FALSE)
Returns an array of view as options array, that can be used by select, checkboxes and radios as #options.
static array
pluginList()
Returns a list of plugins and metadata about them.
static array
getHandlerTypes()
Provide a list of views handler types used in a view, with some information about them.
static array
getPluginTypes(string $type = NULL)
Returns a list of plugin types.
static protected
t($string, array $args = [], array $options = [])
Translates a string to the current language or to a given language.
See the t() documentation for details.