You are here

function slick_fields_entity_info_alter in Slick Carousel 7.2

Same name and namespace in other branches
  1. 7.3 slick_fields/slick_fields.module \slick_fields_entity_info_alter()

Implements hook_entity_info_alter().

File

slick_fields/slick_fields.module, line 185
Provides fields integration for the Slick carousel.

Code

function slick_fields_entity_info_alter(&$entity_info) {
  foreach ($entity_info as $key => $entity) {
    if (in_array($key, array(
      'file',
      'field_collection_item',
    )) && !isset($entity_info[$key]['view modes']['slick_carousel'])) {
      $entity_info[$key]['view modes']['slick_carousel'] = array(
        'label' => t('Slick carousel'),
        'custom settings' => FALSE,
      );
    }
  }
}