diff --git a/web/modules/custom/blog/src/EventSubscriber/PushPostToSocialMediaOnceItIsPublished.php b/web/modules/custom/blog/src/EventSubscriber/PushPostToSocialMediaOnceItIsPublished.php index ee6d137..5a37f49 100644 --- a/web/modules/custom/blog/src/EventSubscriber/PushPostToSocialMediaOnceItIsPublished.php +++ b/web/modules/custom/blog/src/EventSubscriber/PushPostToSocialMediaOnceItIsPublished.php @@ -23,12 +23,12 @@ final class PushPostToSocialMediaOnceItIsPublished implements EventSubscriberInt */ public static function getSubscribedEvents() { return [ - HookEventDispatcherInterface::ENTITY_INSERT => 'onEntityUpdate', - HookEventDispatcherInterface::ENTITY_UPDATE => 'onEntityUpdate', + HookEventDispatcherInterface::ENTITY_INSERT => 'pushPost', + HookEventDispatcherInterface::ENTITY_UPDATE => 'pushPost', ]; } - public function onEntityUpdate(AbstractEntityEvent $event): void { + public function pushPost(AbstractEntityEvent $event): void { $entity = $event->getEntity(); if ($entity->getEntityTypeId() != 'node') { diff --git a/web/modules/custom/blog/src/EventSubscriber/SortTagsAlphabeticallyWhenPostIsSaved.php b/web/modules/custom/blog/src/EventSubscriber/SortTagsAlphabeticallyWhenPostIsSaved.php index 0978e12..b032744 100644 --- a/web/modules/custom/blog/src/EventSubscriber/SortTagsAlphabeticallyWhenPostIsSaved.php +++ b/web/modules/custom/blog/src/EventSubscriber/SortTagsAlphabeticallyWhenPostIsSaved.php @@ -17,11 +17,11 @@ final class SortTagsAlphabeticallyWhenPostIsSaved implements EventSubscriberInte */ public static function getSubscribedEvents() { return [ - HookEventDispatcherInterface::ENTITY_PRE_SAVE => 'onEntityPreSave', + HookEventDispatcherInterface::ENTITY_PRE_SAVE => 'sortTags', ]; } - public function onEntityPresave(AbstractEntityEvent $event): void { + public function sortTags(AbstractEntityEvent $event): void { $entity = $event->getEntity(); if ($entity->getEntityTypeId() != 'node') {