function Views::pluginManager
Same name and namespace in other branches
- 11.x core/modules/views/src/Views.php \Drupal\views\Views::pluginManager()
- 10 core/modules/views/src/Views.php \Drupal\views\Views::pluginManager()
- 9 core/modules/views/src/Views.php \Drupal\views\Views::pluginManager()
- 8.9.x core/modules/views/src/Views.php \Drupal\views\Views::pluginManager()
Returns the plugin manager for a certain views plugin type.
Parameters
string $type: The plugin type, for example filter.
Return value
\Drupal\views\Plugin\ViewsPluginManager The Views plugin manager service.
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service('plugin.manager.views.{type}') for specific types or \Drupal::service('views.plugin_managers')->get($type) for dynamic.
See also
https://www.drupal.org/node/3566982
1 call to Views::pluginManager()
- ViewsTest::testPluginManagerDeprecation in core/
modules/ views/ tests/ src/ Unit/ ViewsTest.php - Tests the ::pluginManager() deprecation.
File
-
core/
modules/ views/ src/ Views.php, line 106
Class
- Views
- Static service container wrapper for views.
Namespace
Drupal\viewsCode
public static function pluginManager($type) {
@trigger_error(__METHOD__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \\Drupal::service(\'plugin.manager.views.{type}\') for specific plugin types or \\Drupal::service(\'views.plugin_managers\')->get($type) for dynamic types. See https://www.drupal.org/node/3566982', E_USER_DEPRECATED);
return \Drupal::service('views.plugin_managers')->get($type);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.