You are here

function views_get_plugin_definitions in Views (for Drupal 7) 8.3

Gets all the views plugin definitions.

Parameters

string|false $type: Either the plugin type, or FALSE to load all definitions.

Return value

array An array of plugin definitions for a single type, or an associative array of plugin definitions keyed by plugin type.

8 calls to views_get_plugin_definitions()
ArgumentPluginBase::buildOptionsForm in lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
Build the options form.
ArgumentPluginBase::default_argument_form in lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
Provide a form for selecting the default argument when the default action is set to provide default argument.
ArgumentPluginBase::default_summary_form in lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
Provide a form for selecting further summary options when the default action is set to display one.
PluginInstanceTest::setUp in lib/Drupal/views/Tests/PluginInstanceTest.php
Sets up a Drupal site for running functional and integration tests.
views_fetch_plugin_names in ./views.module
Fetch a list of all base tables available

... See full list

File

./views.module, line 1414
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_get_plugin_definitions($type = FALSE) {
  $plugins = array();
  $plugin_types = $type ? array(
    $type,
  ) : ViewExecutable::getPluginTypes();
  $container = drupal_container();
  foreach ($plugin_types as $plugin_type) {
    $plugins[$plugin_type] = $container
      ->get("plugin.manager.views.{$plugin_type}")
      ->getDefinitions();
  }
  if ($type) {
    return $plugins[$type];
  }
  return $plugins;
}