Skip to content

Commit

Permalink
chore: register listener
Browse files Browse the repository at this point in the history
  • Loading branch information
shpran committed Sep 11, 2024
1 parent 7e8439d commit 5bcad6c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
33 changes: 33 additions & 0 deletions migrations/Version202409111328111101_taoQtiItem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace oat\taoQtiItem\migrations;

use Doctrine\DBAL\Schema\Schema;
use oat\tao\scripts\tools\migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*
* phpcs:disable Squiz.Classes.ValidClassName
*/
final class Version202409111328111101_taoQtiItem extends AbstractMigration
{
public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs

}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs

}
}
6 changes: 6 additions & 0 deletions scripts/install/ItemEventRegister.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
use oat\taoItems\model\event\ItemContentClonedEvent;
use oat\taoItems\model\event\ItemCreatedEvent;
use oat\taoItems\model\event\ItemRdfUpdatedEvent;
use oat\taoItems\model\event\ItemUpdatedEvent;
use oat\taoQtiItem\model\Listener\ItemUpdater;
use oat\taoQtiItem\model\Listener\ReplaceCopiedQtiXmlIdentifierListener;
use oat\taoQtiItem\model\qti\Service;
use oat\taoQtiItem\model\Translation\Listener\ItemUpdatedEventListener;

/**
* Description of ItemEventRegister
Expand All @@ -51,5 +53,9 @@ public function __invoke($params)
ItemContentClonedEvent::class,
[ReplaceCopiedQtiXmlIdentifierListener::class, 'catchItemCreatedFromSource']
);
$this->registerEvent(
ItemUpdatedEvent::class,
[ItemUpdatedEventListener::class, 'populateTranslationProperties']
);
}
}

0 comments on commit 5bcad6c

Please sign in to comment.