You are here

public static function BlazyMediaInterface::imageItem in Blazy 8.2

Extracts image from non-media entities for the main background/ stage.

Main image can be separate image item from video thumbnail for highres. Fallback to default thumbnail if any, which has no file API. This used to be for non-media File Entity Reference at 1.x, things changed since then. This is currently reused for Paragraphs which embeds Media.

Parameters

array $element: The element array might contain item and settings.

object $entity: The file entity or entityreference which might have image item.

See also

\Drupal\blazy\Dejavu\BlazyEntityMediaBase::buildElement

1 method overrides BlazyMediaInterface::imageItem()
BlazyMedia::imageItem in src/BlazyMedia.php
Extracts image from non-media entities for the main background/ stage.

File

src/BlazyMediaInterface.php, line 65

Class

BlazyMediaInterface
Provides extra utilities to work with core Media.

Namespace

Drupal\blazy

Code

public static function imageItem(array &$element, $entity);