class MediaSourceInfoAlterEvent in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/media_event_dispatcher/src/Event/Media/MediaSourceInfoAlterEvent.php \Drupal\media_event_dispatcher\Event\Media\MediaSourceInfoAlterEvent
Class MediaSourceInfoAlterEvent.
Hierarchy
- class \Drupal\media_event_dispatcher\Event\Media\MediaSourceInfoAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of MediaSourceInfoAlterEvent
2 files declare their use of MediaSourceInfoAlterEvent
- MediaSourceInfoAlterEventTest.php in modules/
media_event_dispatcher/ tests/ src/ Unit/ Media/ MediaSourceInfoAlterEventTest.php - media_event_dispatcher.module in modules/
media_event_dispatcher/ media_event_dispatcher.module - Media event dispatcher submodule.
File
- modules/
media_event_dispatcher/ src/ Event/ Media/ MediaSourceInfoAlterEvent.php, line 12
Namespace
Drupal\media_event_dispatcher\Event\MediaView source
class MediaSourceInfoAlterEvent extends Event implements EventInterface {
/**
* The array of media source plugin definitions, keyed by plugin ID.
*
* @var array
*/
private $sources;
/**
* MediaSourceInfoAlterEvent constructor.
*
* @param array &$sources
* The array of media source plugin definitions, keyed by plugin ID.
*/
public function __construct(array &$sources) {
$this->sources =& $sources;
}
/**
* Get the media source plugin definitions.
*
* @return array
* The array of media source plugin definitions, keyed by plugin ID.
*/
public function &getSources() : array {
return $this->sources;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::MEDIA_SOURCE_INFO_ALTER;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MediaSourceInfoAlterEvent:: |
private | property | The array of media source plugin definitions, keyed by plugin ID. | |
MediaSourceInfoAlterEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
MediaSourceInfoAlterEvent:: |
public | function | Get the media source plugin definitions. | |
MediaSourceInfoAlterEvent:: |
public | function | MediaSourceInfoAlterEvent constructor. |