public function MediaImage::getFieldValue in Lightning Media 8
Same name and namespace in other branches
- 8.4 src/Plugin/entity_embed/EntityEmbedDisplay/MediaImage.php \Drupal\lightning_media\Plugin\entity_embed\EntityEmbedDisplay\MediaImage::getFieldValue()
- 8.2 src/Plugin/entity_embed/EntityEmbedDisplay/MediaImage.php \Drupal\lightning_media\Plugin\entity_embed\EntityEmbedDisplay\MediaImage::getFieldValue()
- 8.3 src/Plugin/entity_embed/EntityEmbedDisplay/MediaImage.php \Drupal\lightning_media\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
- src/
Plugin/ entity_embed/ EntityEmbedDisplay/ MediaImage.php, line 85
Class
- MediaImage
- Renders a media item's image via the image formatter.
Namespace
Drupal\lightning_media\Plugin\entity_embed\EntityEmbedDisplayCode
public function getFieldValue() {
$value = parent::getFieldValue();
$value['target_id'] = $this
->getItem()->target_id;
return $value;
}