You are here

public function MediaSourceInterface::getMetadata in Drupal 10

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

Gets the value for a metadata attribute for a given media item.

Parameters

\Drupal\media\MediaInterface $media: A media item.

string $attribute_name: Name of the attribute to fetch.

Return value

mixed|null Metadata attribute value or NULL if unavailable.

File

core/modules/media/src/MediaSourceInterface.php, line 119

Class

MediaSourceInterface
Defines the interface for media source plugins.

Namespace

Drupal\media

Code

public function getMetadata(MediaInterface $media, $attribute_name);