Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MediaSourceInterface.php

function 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.

1 method overrides MediaSourceInterface::getSourceFieldValue()
MediaSourceBase::getSourceFieldValue in core/modules/media/src/MediaSourceBase.php
Get the primary value stored in the source field.

File

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

Class

MediaSourceInterface
Defines the interface for media source plugins.

Namespace

Drupal\media

Code

public function getSourceFieldValue(MediaInterface $media);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal