| Total Complexity | 5 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 12 | #[Package('content')] |
||
| 13 | class MediaUploadedEvent extends Event implements MediaUploadedAware |
||
| 14 | { |
||
| 15 | public const EVENT_NAME = 'media.uploaded'; |
||
| 16 | |||
| 17 | public function __construct( |
||
| 18 | private readonly string $mediaId, |
||
| 19 | private readonly Context $context |
||
| 20 | ) { |
||
| 21 | } |
||
| 22 | |||
| 23 | public function getName(): string |
||
| 24 | { |
||
| 25 | return self::EVENT_NAME; |
||
| 26 | } |
||
| 27 | |||
| 28 | public static function getAvailableData(): EventDataCollection |
||
| 29 | { |
||
| 30 | return (new EventDataCollection()) |
||
| 31 | ->add('mediaId', new ScalarValueType(ScalarValueType::TYPE_STRING)); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getMediaId(): string |
||
| 35 | { |
||
| 36 | return $this->mediaId; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getContext(): Context |
||
| 42 | } |
||
| 43 | } |
||
| 44 |