function MediaSourceInterface::getMetadata
Same name in other branches
- 8.9.x core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::getMetadata()
- 10 core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::getMetadata()
- 11.x 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.
1 method overrides MediaSourceInterface::getMetadata()
- MediaSourceBase::getMetadata in core/
modules/ media/ src/ MediaSourceBase.php - Gets the value for a metadata attribute for a given media item.
File
-
core/
modules/ media/ src/ MediaSourceInterface.php, line 119
Class
- MediaSourceInterface
- Defines the interface for media source plugins.
Namespace
Drupal\mediaCode
public function getMetadata(MediaInterface $media, $attribute_name);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.