.../media/src/Plugin/MediaStorageProxy/Image.php | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/core/modules/media/src/Plugin/MediaStorageProxy/Image.php b/core/modules/media/src/Plugin/MediaStorageProxy/Image.php index 77fdd3d..49b2086 100644 --- a/core/modules/media/src/Plugin/MediaStorageProxy/Image.php +++ b/core/modules/media/src/Plugin/MediaStorageProxy/Image.php @@ -97,33 +97,33 @@ public static function create(ContainerInterface $container, array $configuratio /** * {@inheritdoc} */ - public function getProvidedFields() { - $fields = parent::getProvidedFields(); + public function getMetadataLabels() { + $labels = parent::getMetadataLabels(); - $fields += [ - 'width' => ['label' => $this->t('Width')], - 'height' => ['label' => $this->t('Height')], + $labels += [ + 'width' => $this->t('Width'), + 'height' => $this->t('Height'), ]; if ($this->canReadExifData()) { - $fields += [ - 'model' => ['label' => $this->t('Camera model')], - 'created' => ['label' => $this->t('Image creation datetime')], - 'iso' => ['label' => $this->t('Iso')], - 'exposure' => ['label' => $this->t('Exposure time')], - 'aperture' => ['label' => $this->t('Aperture value')], - 'focal_length' => ['label' => $this->t('Focal length')], + $labels += [ + 'model' => $this->t('Camera model'), + 'created' => $this->t('Image creation datetime'), + 'iso' => $this->t('Iso'), + 'exposure' => $this->t('Exposure time'), + 'aperture' => $this->t('Aperture value'), + 'focal_length' => $this->t('Focal length'), ]; } - return $fields; + return $labels; } /** * {@inheritdoc} */ - public function getField(MediaInterface $media, $name) { - $value = parent::getField($media, $name); + public function getMetadata(MediaInterface $media, $name) { + $value = parent::getMetadata($media, $name); if ($value !== FALSE) { return $value;