function File::getMetadataAttributes

Same name in other branches
  1. 9 core/modules/media/src/Plugin/media/Source/File.php \Drupal\media\Plugin\media\Source\File::getMetadataAttributes()
  2. 8.9.x core/modules/media/src/Plugin/media/Source/File.php \Drupal\media\Plugin\media\Source\File::getMetadataAttributes()
  3. 11.x core/modules/media/src/Plugin/media/Source/File.php \Drupal\media\Plugin\media\Source\File::getMetadataAttributes()

Overrides MediaSourceInterface::getMetadataAttributes

1 method overrides File::getMetadataAttributes()
Image::getMetadataAttributes in core/modules/media/src/Plugin/media/Source/Image.php
Gets a list of metadata attributes provided by this plugin.

File

core/modules/media/src/Plugin/media/Source/File.php, line 49

Class

File
File entity media source.

Namespace

Drupal\media\Plugin\media\Source

Code

public function getMetadataAttributes() {
    return [
        static::METADATA_ATTRIBUTE_NAME => $this->t('Name'),
        static::METADATA_ATTRIBUTE_MIME => $this->t('MIME type'),
        static::METADATA_ATTRIBUTE_SIZE => $this->t('File size'),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.