picture.module in Picture 8
Same filename and directory in other branches
Hook implementations for the picture module.
File
picture.moduleView source
<?php
/**
* @file
* Hook implementations for the picture module.
*/
// Load all Field module hooks for Picture.
require_once __DIR__ . '/picture.field.inc';
/**
* Implements hook_entity_type_alter
*/
function picture_entity_type_alter(array &$entity_types) {
/* @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
$entity_types['responsive_image_style']
->setFormClass('add', 'Drupal\\picture\\PictureMappingForm');
$entity_types['responsive_image_style']
->setFormClass('edit', 'Drupal\\picture\\PictureMappingForm');
$entity_types['responsive_image_style']
->setFormClass('duplicate', 'Drupal\\picture\\PictureMappingForm');
}
/**
* Implements hook_theme().
*/
function picture_theme() {
return array(
// Theme functions in picture.field.inc.
'image_sizes_formatter' => array(
'variables' => array(
'item' => NULL,
'item_attributes' => NULL,
'path' => NULL,
'image_styles' => array(),
'fallback_image_style' => NULL,
'sizes' => NULL,
),
'file' => 'picture.field.inc',
'template' => 'image-sizes-formatter',
),
);
}
Functions
Name | Description |
---|---|
picture_entity_type_alter | Implements hook_entity_type_alter |
picture_theme | Implements hook_theme(). |