diff -u b/src/Hook/ChatSpaceHooks.php b/src/Hook/ChatSpaceHooks.php --- b/src/Hook/ChatSpaceHooks.php +++ b/src/Hook/ChatSpaceHooks.php @@ -28,7 +28,7 @@ * Implements hook_theme(). */ #[Hook('theme')] - public static function theme($existing, $type, $theme, $path) + public function theme($existing, $type, $theme, $path) { return [ 'chat_space_room' => [ @@ -79,7 +79,7 @@ * Implements hook_cron(). */ #[Hook('cron')] - public static function cron() + public function cron() { $config = \Drupal::config('chat_space.settings'); $retention_days = $config->get('mention_retention_days') ?: 30; @@ -117,7 +117,7 @@ * Implements hook_user_cancel(). */ #[Hook('user_cancel')] - public static function userCancel($edit, $account, $method) + public function userCancel($edit, $account, $method) { try { // Remove mentions sent by this user. @@ -148,7 +148,7 @@ * Implements hook_entity_delete(). */ #[Hook('entity_delete')] - public static function entityDelete($entity) + public function entityDelete($entity) { if ($entity->getEntityTypeId() === 'chat_space_message') { try { @@ -185,7 +185,7 @@ * Implements hook_preprocess_HOOK() for mention notifications. */ #[Hook('preprocess_chat_space_mention_notification')] - public static function preprocessChatSpaceMentionNotification(&$variables) + public function preprocessChatSpaceMentionNotification(&$variables) { $sender = $variables['sender']; $mentioned_user = $variables['mentioned_user'];