entity_background_image.install in Entity background 7
Install file entity background image.
File
module/entity_background_image/entity_background_image.installView source
<?php
/**
* @file
* Install file entity background image.
*/
/**
* Implements hook_install().
*/
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,
));
}
Functions
Name | Description |
---|---|
entity_background_image_install | Implements hook_install(). |