class LegacyModuleImplementsAlter
Prevents procedural hook_module_implements_alter from executing.
This allows the use of the legacy hook_module_implements_alter alongside attribute-based ordering. Providing support for versions of Drupal older than 11.2.0.
Marking hook_module_implements_alter as #LegacyModuleImplementsAlter will prevent hook_module_implements_alter from running when attribute-based ordering is available.
On older versions of Drupal which are not aware of attribute-based ordering, only the legacy hook implementation is executed.
Attributes
#[\Attribute(\Attribute::TARGET_FUNCTION)]
Hierarchy
- class \Drupal\Core\Hook\Attribute\LegacyModuleImplementsAlter
Expanded class hierarchy of LegacyModuleImplementsAlter
2 files declare their use of LegacyModuleImplementsAlter
- HookCollectorPass.php in core/
lib/ Drupal/ Core/ Hook/ HookCollectorPass.php - module_implements_alter_test_legacy.module in core/
tests/ Drupal/ Tests/ Core/ Extension/ modules/ module_implements_alter_test_legacy/ module_implements_alter_test_legacy.module
File
-
core/
lib/ Drupal/ Core/ Hook/ Attribute/ LegacyModuleImplementsAlter.php, line 21
Namespace
Drupal\Core\Hook\AttributeView source
class LegacyModuleImplementsAlter {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.