You are here

protected function MediaType::sourcePluginCollection in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media/src/Entity/MediaType.php \Drupal\media\Entity\MediaType::sourcePluginCollection()
  2. 9 core/modules/media/src/Entity/MediaType.php \Drupal\media\Entity\MediaType::sourcePluginCollection()

Returns media source lazy plugin collection.

Return value

\Drupal\Core\Plugin\DefaultSingleLazyPluginCollection|null The tag plugin collection or NULL if the plugin ID was not set yet.

2 calls to MediaType::sourcePluginCollection()
MediaType::getPluginCollections in core/modules/media/src/Entity/MediaType.php
Gets the plugin collections used by this object.
MediaType::getSource in core/modules/media/src/Entity/MediaType.php
Returns the media source plugin.

File

core/modules/media/src/Entity/MediaType.php, line 198

Class

MediaType
Defines the Media type configuration entity.

Namespace

Drupal\media\Entity

Code

protected function sourcePluginCollection() {
  if (!$this->sourcePluginCollection && $this->source) {
    $this->sourcePluginCollection = new DefaultSingleLazyPluginCollection(\Drupal::service('plugin.manager.media.source'), $this->source, $this->source_configuration);
  }
  return $this->sourcePluginCollection;
}