Feature: Automatic registration of AccessItemInterface
Description
EXT: provides the
\Access
to define access subtypes to use as Custom Permission Options
grouped as deepltranslate.
These items are now automatically registered through the Symfony Dependency
Injection container by simply providing autoconfigured classes implementing
\Access.
No manual registration required anymore.
Note
See also deprecated AccessRegistry methods to deal with deprecated methods and avoid deprecation log entries.
Example
Implement custom access class:
<?php
namespace MyVendor\MyExt\Access;
use WebVision\Deepltranslate\Core\Access\AccessItemInterface;
final class CustomAccess implements AccessItemInterface
{
public function getIdentifier(): string
{
return 'customAccess';
}
public function getTitle(): string
{
return sprintf(
'%s:%s',
'LLL:EXT:my_ext/Resources/Private/Language/locallang.xlf',
'be_groups.deepltranslate_access.items.customAccess.title',
);
}
public function getDescription(): string
{
return sprintf(
'%s:%s',
'LLL:EXT:my_ext/Resources/Private/Language/locallang.xlf',
'be_groups.deepltranslate_access.items.customAccess.description',
);
}
public function getIconIdentifier(): string
{
return 'custom-access-logo';
}
}
Impact
Classes implementing
\Access
defined in extensions are now automatically registered and possible provide any
access items which have not been registered manually before.
This can be mitigated by using
# attribute on the class or exclude
it from the autoconfigure load configuration in Configuration/.