mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-19 19:07:31 +02:00
28 lines
638 B
PHP
28 lines
638 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Events\Document\Page;
|
|
|
|
use App\Actions\Models\Document\UpdatePageRelations;
|
|
use App\Contracts\Events\UpdateRelationsEvent;
|
|
use App\Events\Base\Document\DocumentUpdatedEvent;
|
|
use App\Models\Document\Page;
|
|
|
|
/**
|
|
* @extends DocumentUpdatedEvent<Page>
|
|
*/
|
|
class PageUpdated extends DocumentUpdatedEvent implements UpdateRelationsEvent
|
|
{
|
|
public function __construct(Page $page)
|
|
{
|
|
parent::__construct($page);
|
|
$this->initializeEmbedFields($page);
|
|
}
|
|
|
|
public function updateRelations(): void
|
|
{
|
|
new UpdatePageRelations()->handle($this->getModel());
|
|
}
|
|
}
|