Rollback media substituted event renaming

This commit is contained in:
Mathieu Darse
2015-02-09 19:19:20 +01:00
parent 55845b9531
commit 0701dfbb30
4 changed files with 4 additions and 4 deletions

View File

@@ -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';
}

View File

@@ -11,6 +11,6 @@
namespace Alchemy\Phrasea\Core\Event\Record;
class RecordSubDefinitionSubstitutedEvent extends RecordEvent
class RecordMediaSubstitutedEvent extends RecordEvent
{
}

View File

@@ -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));
}
}

View File

@@ -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',
];
}