Skip to content
Snippets Groups Projects
Commit 9dd01cce authored by Ivan Bustos's avatar Ivan Bustos Committed by Jonathan Hedstrom
Browse files

Issue #2900134 by ibustos: Allow other modules to alter existing plugin definitions

parent 3a214fb8
No related branches found
No related tags found
No related merge requests found
<?php
/**
* @file
* Hooks for the field_permissions module.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Alters discovered field_permission_type plugins.
*
* @param array $definitions
* Discovered definitions.
*/
function hook_field_permission_type_plugin_alter(array &$definitions) {
unset($definitions['private']);
}
/**
* @} End of "addtogroup hooks".
*/
......@@ -30,6 +30,7 @@ class Manager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/FieldPermissionType', $namespaces, $module_handler, FieldPermissionTypeInterface::class, FieldPermissionType::class);
$this->setCacheBackend($cache_backend, 'field_permission_type_plugins');
$this->alterInfo('field_permission_type_plugin');
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment