public function BlazyManagerBase::getResponsiveImageStyles in Blazy 8.2
Returns the Responsive image styles and caches tags.
Parameters
object $responsive: The responsive image style entity.
Return value
array|mixed The responsive image styles and cache tags.
1 call to BlazyManagerBase::getResponsiveImageStyles()
- BlazyManager::buildResponsiveImage in src/
BlazyManager.php - Build out Responsive image.
File
- src/
BlazyManagerBase.php, line 454
Class
- BlazyManagerBase
- Implements BlazyManagerInterface.
Namespace
Drupal\blazyCode
public function getResponsiveImageStyles($responsive) {
$cache_tags = $responsive
->getCacheTags();
$image_styles = $this
->entityLoadMultiple('image_style', $responsive
->getImageStyleIds());
foreach ($image_styles as $image_style) {
$cache_tags = Cache::mergeTags($cache_tags, $image_style
->getCacheTags());
}
return [
'caches' => $cache_tags,
'styles' => $image_styles,
];
}