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

Breadcrumb

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

function 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\media

Code

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

API Navigation

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