- Issue created by @partdigital
- @partdigital opened merge request.
- Status changed to Fixed
about 1 year ago 2:26pm 4 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.
Right now, all 8 access policy type plugins are stored in src/Plugin
directory. As a result, you can get a lot of those plugins dispersed amongst all other sorts of plugin types which aren't related to access policy and it makes it look messy.
Move the access policy plugins to src/Plugin/access_policy
and update their namespaces.
When creating your own access policy plugin (access rule, selection rule, access policy type etc). you need to do the following:
Save the plugin in the access_policy directory:
my_module/src/Plugin/access_policy/AccessRule/CustomAccessRule.php
Make sure that the namespace is correct:
namespace Drupal\my_module\Plugin\access_policy\AccessRule;
use Drupal\access_policy\Plugin\access_policy\AccessRule\AccessRuleBase;
/**
* My custom access rule.
*/
class CustomAccessRule extends AccessRuleBase {
// ...
}
Fixed
1.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.