function Views::handlerManager
Same name and namespace in other branches
- 11.x core/modules/views/src/Views.php \Drupal\views\Views::handlerManager()
- 10 core/modules/views/src/Views.php \Drupal\views\Views::handlerManager()
- 9 core/modules/views/src/Views.php \Drupal\views\Views::handlerManager()
- 8.9.x core/modules/views/src/Views.php \Drupal\views\Views::handlerManager()
Returns the plugin manager for a certain views handler type.
Parameters
string $type: The handler type, for example relationship, field, or filter.
Return value
\Drupal\views\Plugin\ViewsHandlerManager 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::handlerManager()
- ViewsTest::testHandlerManagerDeprecation in core/
modules/ views/ tests/ src/ Unit/ ViewsTest.php - Tests the ::handlerManager() deprecation.
File
-
core/
modules/ views/ src/ Views.php, line 126
Class
- Views
- Static service container wrapper for views.
Namespace
Drupal\viewsCode
public static function handlerManager($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 handler 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.