function insert_responsive_image_insert_styles in Insert 8.2
Implements hook_insert_styles().
File
- modules/
insert_responsive_image/ insert_responsive_image.module, line 14
Code
function insert_responsive_image_insert_styles($insertType) {
if ($insertType !== INSERT_TYPE_IMAGE) {
return [];
}
$insertStyles = [];
/* @var ResponsiveImageStyle $style */
foreach (ResponsiveImageStyle::loadMultiple() as $i => $style) {
$insertStyles['responsive_image__' . $style
->id()] = [
'label' => t('Responsive') . ': ' . $style
->id(),
];
}
return $insertStyles;
}