From 568ce2c6de111064217eb5b69e6ec5e3e3dc3e38 Mon Sep 17 00:00:00 2001 From: catch <6915-catch@users.noreply.drupalcode.org> Date: Tue, 3 Dec 2024 10:50:14 +0000 Subject: [PATCH] Issue #3482464 by nicxvan, berdir: Backport Hook and LegacyHook Attribute (cherry picked from commit 5712beef56876595027d5bb9b91fe2b57972413f) --- core/lib/Drupal/Core/Hook/Attribute/Hook.php | 56 +++++++++++++++++++ .../Drupal/Core/Hook/Attribute/LegacyHook.php | 17 ++++++ 2 files changed, 73 insertions(+) create mode 100644 core/lib/Drupal/Core/Hook/Attribute/Hook.php create mode 100644 core/lib/Drupal/Core/Hook/Attribute/LegacyHook.php diff --git a/core/lib/Drupal/Core/Hook/Attribute/Hook.php b/core/lib/Drupal/Core/Hook/Attribute/Hook.php new file mode 100644 index 00000000000..822f7ba013e --- /dev/null +++ b/core/lib/Drupal/Core/Hook/Attribute/Hook.php @@ -0,0 +1,56 @@ +method = $method; + return $this; + } + +} diff --git a/core/lib/Drupal/Core/Hook/Attribute/LegacyHook.php b/core/lib/Drupal/Core/Hook/Attribute/LegacyHook.php new file mode 100644 index 00000000000..4e5864088b7 --- /dev/null +++ b/core/lib/Drupal/Core/Hook/Attribute/LegacyHook.php @@ -0,0 +1,17 @@ +