diff -u b/src/Hook/AlttextingHooks.php b/src/Hook/AlttextingHooks.php --- b/src/Hook/AlttextingHooks.php +++ b/src/Hook/AlttextingHooks.php @@ -18,7 +18,7 @@ * Implements hook_theme(). */ #[Hook('theme')] - public static function theme($existing, $type, $theme, $path) + public function theme($existing, $type, $theme, $path) { return [ 'alttexting_button' => [ @@ -88,7 +88,7 @@ * Implements hook_ENTITY_TYPE_insert() for media entities. */ #[Hook('media_insert')] - public static function mediaInsert(\Drupal\media\MediaInterface $media): void + public function mediaInsert(\Drupal\media\MediaInterface $media): void { alttexting_media_processor($media); } @@ -96,7 +96,7 @@ * Implements hook_ENTITY_TYPE_update() for media entities. */ #[Hook('media_update')] - public static function mediaUpdate(\Drupal\media\MediaInterface $media): void + public function mediaUpdate(\Drupal\media\MediaInterface $media): void { alttexting_media_processor($media); }