PHRAS-1216_story-cover-changed-event

- fix : class name/extend changed,
#time 10m
This commit is contained in:
Jean-Yves Gaulier
2016-09-21 15:47:55 +02:00
parent e10971a88f
commit 1c1e9cf723
2 changed files with 4 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ use Alchemy\Phrasea\Application\Helper\SubDefinitionSubstituerAware;
use Alchemy\Phrasea\Controller\Controller;
use Alchemy\Phrasea\Controller\RecordsRequest;
use Alchemy\Phrasea\Core\Event\Record\RecordEvents;
use Alchemy\Phrasea\Core\Event\Record\StoryCoverChanged;
use Alchemy\Phrasea\Core\Event\Record\StoryCoverChangedEvent;
use Alchemy\Phrasea\Core\Event\RecordEdit;
use Alchemy\Phrasea\Core\PhraseaEvents;
use Alchemy\Phrasea\Model\Entities\Preset;
@@ -311,7 +311,7 @@ class EditController extends Controller
$subdefChanged = true;
}
if($subdefChanged) {
$this->dispatch(RecordEvents::STORY_COVER_CHANGED, new StoryCoverChanged($reg_record, $newsubdef_reg));
$this->dispatch(RecordEvents::STORY_COVER_CHANGED, new StoryCoverChangedEvent($reg_record, $newsubdef_reg));
$this->dispatch(PhraseaEvents::RECORD_EDIT, new RecordEdit($reg_record));
}
} catch (\Exception $e) {

View File

@@ -12,8 +12,9 @@
namespace Alchemy\Phrasea\Core\Event\Record;
use record_adapter;
use Symfony\Component\EventDispatcher\Event;
class StoryCoverChanged extends RecordEvent
class StoryCoverChangedEvent extends Event
{
/** @var record_adapter $record */
private $story_record;