You are here

public function MediaImage::getFieldValue in Varbase Media 8.6

Same name and namespace in other branches
  1. 8.7 modules/entity_browser_generic_embed/src/Plugin/entity_embed/EntityEmbedDisplay/MediaImage.php \Drupal\entity_browser_generic_embed\Plugin\entity_embed\EntityEmbedDisplay\MediaImage::getFieldValue()
  2. 8.5 modules/entity_browser_generic_embed/src/Plugin/entity_embed/EntityEmbedDisplay/MediaImage.php \Drupal\entity_browser_generic_embed\Plugin\entity_embed\EntityEmbedDisplay\MediaImage::getFieldValue()
  3. 9.0.x modules/entity_browser_generic_embed/src/Plugin/entity_embed/EntityEmbedDisplay/MediaImage.php \Drupal\entity_browser_generic_embed\Plugin\entity_embed\EntityEmbedDisplay\MediaImage::getFieldValue()

Get the field value required to pass into the field formatter.

Return value

mixed The field value.

Overrides ImageFieldFormatter::getFieldValue

File

modules/entity_browser_generic_embed/src/Plugin/entity_embed/EntityEmbedDisplay/MediaImage.php, line 85

Class

MediaImage
Renders a media item's image via the image formatter.

Namespace

Drupal\entity_browser_generic_embed\Plugin\entity_embed\EntityEmbedDisplay

Code

public function getFieldValue() {
  $value = parent::getFieldValue();
  $value['target_id'] = $this
    ->getItem()->target_id;
  return $value;
}