function ResponsiveImageThemeHooks::theme
Implements hook_theme().
Attributes
#[Hook('theme')]
File
-
core/
modules/ responsive_image/ src/ Hook/ ResponsiveImageThemeHooks.php, line 28
Class
- ResponsiveImageThemeHooks
- Theme hooks for responsive_image.
Namespace
Drupal\responsive_image\HookCode
public function theme() : array {
return [
'responsive_image' => [
'variables' => [
'uri' => NULL,
'attributes' => [],
'responsive_image_style_id' => [],
'height' => NULL,
'width' => NULL,
],
'initial preprocess' => static::class . ':preprocessResponsiveImage',
],
'responsive_image_formatter' => [
'variables' => [
'item' => NULL,
'item_attributes' => NULL,
'url' => NULL,
'responsive_image_style_id' => NULL,
],
'initial preprocess' => static::class . ':preprocessResponsiveImageFormatter',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.