From 0701dfbb30bb2c22a8864295f26efcfdb4596bee Mon Sep 17 00:00:00 2001 From: Mathieu Darse Date: Mon, 9 Feb 2015 19:19:20 +0100 Subject: [PATCH] Rollback media substituted event renaming --- lib/Alchemy/Phrasea/Core/Event/Record/RecordEvents.php | 2 +- ...tionSubstitutedEvent.php => RecordMediaSubstitutedEvent.php} | 2 +- lib/Alchemy/Phrasea/Media/SubdefSubstituer.php | 2 +- lib/Alchemy/Phrasea/SearchEngine/Elastic/IndexerSubscriber.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename lib/Alchemy/Phrasea/Core/Event/Record/{RecordSubDefinitionSubstitutedEvent.php => RecordMediaSubstitutedEvent.php} (80%) diff --git a/lib/Alchemy/Phrasea/Core/Event/Record/RecordEvents.php b/lib/Alchemy/Phrasea/Core/Event/Record/RecordEvents.php index 1c117cab28..1fcfd88167 100644 --- a/lib/Alchemy/Phrasea/Core/Event/Record/RecordEvents.php +++ b/lib/Alchemy/Phrasea/Core/Event/Record/RecordEvents.php @@ -22,5 +22,5 @@ final class RecordEvents const STATUS_CHANGED = 'record.status_changed'; // Sub-definitions const SUB_DEFINITION_CREATED = 'record.sub_definition_created'; - const SUB_DEFINITION_SUBSTITUTED = 'record.sub_definition_substituted'; + const MEDIA_SUBSTITUTED = 'record.media_substituted'; } diff --git a/lib/Alchemy/Phrasea/Core/Event/Record/RecordSubDefinitionSubstitutedEvent.php b/lib/Alchemy/Phrasea/Core/Event/Record/RecordMediaSubstitutedEvent.php similarity index 80% rename from lib/Alchemy/Phrasea/Core/Event/Record/RecordSubDefinitionSubstitutedEvent.php rename to lib/Alchemy/Phrasea/Core/Event/Record/RecordMediaSubstitutedEvent.php index fcc8915f8b..a2d9c6115d 100644 --- a/lib/Alchemy/Phrasea/Core/Event/Record/RecordSubDefinitionSubstitutedEvent.php +++ b/lib/Alchemy/Phrasea/Core/Event/Record/RecordMediaSubstitutedEvent.php @@ -11,6 +11,6 @@ namespace Alchemy\Phrasea\Core\Event\Record; -class RecordSubDefinitionSubstitutedEvent extends RecordEvent +class RecordMediaSubstitutedEvent extends RecordEvent { } diff --git a/lib/Alchemy/Phrasea/Media/SubdefSubstituer.php b/lib/Alchemy/Phrasea/Media/SubdefSubstituer.php index a9b505f841..4f2b248f24 100644 --- a/lib/Alchemy/Phrasea/Media/SubdefSubstituer.php +++ b/lib/Alchemy/Phrasea/Media/SubdefSubstituer.php @@ -97,6 +97,6 @@ class SubdefSubstituer $record->rebuild_subdefs(); } - $this->dispatcher->dispatch(RecordEvents::SUB_DEFINITION_SUBSTITUTED, new RecordMediaSubstitutedEvent($record)); + $this->dispatcher->dispatch(RecordEvents::MEDIA_SUBSTITUTED, new RecordMediaSubstitutedEvent($record)); } } diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/IndexerSubscriber.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/IndexerSubscriber.php index 6cb82e3b04..a269bc42db 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/IndexerSubscriber.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/IndexerSubscriber.php @@ -47,7 +47,7 @@ class IndexerSubscriber implements EventSubscriberInterface RecordEvents::ORIGINAL_NAME_CHANGED => 'onRecordChange', RecordEvents::STATUS_CHANGED => 'onRecordChange', RecordEvents::SUB_DEFINITION_CREATED => 'onRecordChange', - RecordEvents::SUB_DEFINITION_SUBSTITUTED => 'onRecordChange', + RecordEvents::MEDIA_SUBSTITUTED => 'onRecordChange', KernelEvents::TERMINATE => 'onKernelTerminate', ]; }