You are here

function entity_background_image_install in Entity background 7

Implements hook_install().

File

module/entity_background_image/entity_background_image.install, line 11
Install file entity background image.

Code

function entity_background_image_install() {

  // Default settings of EB_IMAGE_STYLE_FIELD.
  $settings = array(
    'allowed_values' => array(
      'repeat' => 'Repeat',
    ),
  );

  // Create field.
  entity_background_add_field_image(EB_FC_ENTITY, EB_FIELD, EB_IMAGE_FIELD, 'Image');
  entity_background_add_field_list_text(EB_FC_ENTITY, EB_FIELD, EB_IMAGE_STYLE_FIELD, 'Style', $settings);

  // Create field group.
  entity_background_create_bd_field_group('group_eb_image', 'Image', array(
    EB_IMAGE_FIELD,
    EB_IMAGE_STYLE_FIELD,
  ));
}