class ViewsTestConfigUpdaterHooks
Hooks for the views_test_config_updater module.
Hierarchy
- class \Drupal\views_test_config_updater\Hook\ViewsTestConfigUpdaterHooks
Expanded class hierarchy of ViewsTestConfigUpdaterHooks
File
-
core/
modules/ views/ tests/ modules/ views_test_config_updater/ src/ Hook/ ViewsTestConfigUpdaterHooks.php, line 16
Namespace
Drupal\views_test_config_updater\HookView source
class ViewsTestConfigUpdaterHooks {
public function __construct(protected readonly ViewsConfigUpdater $viewsConfigUpdater, #[Autowire(service: 'keyvalue')] protected readonly KeyValueFactoryInterface $keyValueFactory) {
}
/**
* Implements hook_ENTITY_TYPE_presave().
*/
public function viewPresave(ViewEntityInterface $view) : void {
$this->keyValueFactory
->get('views_test_config_updater')
->set('deprecations_enabled', $this->viewsConfigUpdater
->areDeprecationsEnabled());
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ViewsTestConfigUpdaterHooks::viewPresave | public | function | Implements hook_ENTITY_TYPE_presave(). |
ViewsTestConfigUpdaterHooks::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.