public function MediaSourceInterface::getSourceFieldValue in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::getSourceFieldValue()
- 9 core/modules/media/src/MediaSourceInterface.php \Drupal\media\MediaSourceInterface::getSourceFieldValue()
Get the primary value stored in the source field.
Parameters
MediaInterface $media: A media item.
Return value
mixed The source value, or NULL if the media item's source field is empty.
Throws
\RuntimeException If the source field for the media source is not defined.
File
- core/
modules/ media/ src/ MediaSourceInterface.php, line 193
Class
- MediaSourceInterface
- Defines the interface for media source plugins.
Namespace
Drupal\mediaCode
public function getSourceFieldValue(MediaInterface $media);