public static function ImageHotspot::loadByTarget in Image Hotspots 8
Load all hotspots that referencing to selected fid of field with style.
Parameters
array $values: An array with keys: 'field_name', 'fid', 'image_style', 'langcode'.
Return value
array An array with hotspots.
Overrides ImageHotspotInterface::loadByTarget
1 call to ImageHotspot::loadByTarget()
- ImageHotspotsFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ ImageHotspotsFormatter.php - Builds a renderable array for a field value.
File
- src/
Entity/ ImageHotspot.php, line 132
Class
- ImageHotspot
- Defines the image hotspot entity class.
Namespace
Drupal\image_hotspots\EntityCode
public static function loadByTarget(array $values) {
$storage = \Drupal::entityTypeManager()
->getStorage('image_hotspot');
return $storage
->loadByProperties($values);
}