diff --git a/efap.module b/efap.module
index fe8dfb6..0c7ec19 100644
--- a/efap.module
+++ b/efap.module
@@ -4,7 +4,8 @@
  * @file
  * Contains efap.module.
  */
-
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\efap\Hook\EfapHooks;
 use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
@@ -12,51 +13,26 @@ use Drupal\Core\Routing\RouteMatchInterface;
 /**
  * Implements hook_help().
  */
-function efap_help($route_name, RouteMatchInterface $route_match) {
-  switch ($route_name) {
-    // Main module help for the efap module.
-    case 'help.page.efap':
-      $output = '';
-      $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('Extra Fields As Plugin') . '</p>';
-      return $output;
-  }
-
-  return [];
+#[LegacyHook]
+function efap_help($route_name, RouteMatchInterface $route_match)
+{
+    return \Drupal::service(EfapHooks::class)->help($route_name, $route_match);
 }
 
 /**
  * Implements hook_entity_extra_field_info().
  */
-function efap_entity_extra_field_info() {
-  $info = [];
-
-  /* @var $manager \Drupal\efap\ExtraFieldPluginManager */
-  $manager = \Drupal::service('efap.plugin_manager');
-  if ($definitions = $manager->getDefinitions()) {
-    foreach ($definitions as $definition) {
-      /** @var \Drupal\efap\ExtraFieldInterface $instance */
-      $instance = $manager->createInstance($definition['id']);
-      $info = array_merge_recursive($info, $instance->info());
-    }
-  }
-
-  return $info;
+#[LegacyHook]
+function efap_entity_extra_field_info()
+{
+    return \Drupal::service(EfapHooks::class)->entityExtraFieldInfo();
 }
 
 /**
  * Implements hook_entity_view().
  */
-function efap_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) {
-  /* @var $manager \Drupal\efap\ExtraFieldPluginManager */
-  $manager = \Drupal::service('efap.plugin_manager');
-  if ($definitions = $manager->getDefinitions()) {
-    foreach ($definitions as $definition) {
-      if ($display->getComponent($definition['id'])) {
-        /** @var \Drupal\efap\ExtraFieldInterface $instance */
-        $instance = $manager->createInstance($definition['id']);
-        $build[$definition['id']] = $instance->view($build, $entity, $display, $view_mode);
-      }
-    }
-  }
+#[LegacyHook]
+function efap_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode)
+{
+    \Drupal::service(EfapHooks::class)->entityView($build, $entity, $display, $view_mode);
 }
diff --git a/efap.services.yml b/efap.services.yml
index 84e40f0..a05a1df 100644
--- a/efap.services.yml
+++ b/efap.services.yml
@@ -2,3 +2,7 @@ services:
   efap.plugin_manager:
     class: Drupal\efap\ExtraFieldPluginManager
     parent: default_plugin_manager
+
+  Drupal\efap\Hook\EfapHooks:
+    class: Drupal\efap\Hook\EfapHooks
+    autowire: true
diff --git a/src/Hook/EfapHooks.php b/src/Hook/EfapHooks.php
new file mode 100644
index 0000000..8928c6d
--- /dev/null
+++ b/src/Hook/EfapHooks.php
@@ -0,0 +1,70 @@
+<?php
+
+namespace Drupal\efap\Hook;
+
+use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+/**
+ * Hook implementations for efap.
+ */
+class EfapHooks
+{
+    use StringTranslationTrait;
+    /**
+     * Implements hook_help().
+     */
+    #[Hook('help')]
+    public function help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match)
+    {
+        switch ($route_name) {
+            // Main module help for the efap module.
+            case 'help.page.efap':
+                $output = '';
+                $output .= '<h3>' . $this->t('About') . '</h3>';
+                $output .= '<p>' . $this->t('Extra Fields As Plugin') . '</p>';
+                return $output;
+        }
+        return [
+        ];
+    }
+    /**
+     * Implements hook_entity_extra_field_info().
+     */
+    #[Hook('entity_extra_field_info')]
+    public function entityExtraFieldInfo()
+    {
+        $info = [
+        ];
+        /* @var $manager \Drupal\efap\ExtraFieldPluginManager */
+        $manager = \Drupal::service('efap.plugin_manager');
+        if ($definitions = $manager->getDefinitions()) {
+            foreach ($definitions as $definition) {
+                /** @var \Drupal\efap\ExtraFieldInterface $instance */
+                $instance = $manager->createInstance($definition['id']);
+                $info = array_merge_recursive($info, $instance->info());
+            }
+        }
+        return $info;
+    }
+    /**
+     * Implements hook_entity_view().
+     */
+    #[Hook('entity_view')]
+    public function entityView(array &$build, \Drupal\Core\Entity\EntityInterface $entity, \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display, $view_mode)
+    {
+        /* @var $manager \Drupal\efap\ExtraFieldPluginManager */
+        $manager = \Drupal::service('efap.plugin_manager');
+        if ($definitions = $manager->getDefinitions()) {
+            foreach ($definitions as $definition) {
+                if ($display->getComponent($definition['id'])) {
+                    /** @var \Drupal\efap\ExtraFieldInterface $instance */
+                    $instance = $manager->createInstance($definition['id']);
+                    $build[$definition['id']] = $instance->view($build, $entity, $display, $view_mode);
+                }
+            }
+        }
+    }
+}
