function entity_background_get_field_image in Entity background 7
Create image field.
Parameters
$field_name: A field name.
$cardinality: Cardinality of the field. Set to 1 by default.
string $uri_scheme: A name of a scheme (private/public).
Return value
array An field information array.
1 call to entity_background_get_field_image()
- entity_background_add_field_image in includes/
entity_background.fields_crud.inc - Creates image field instance.
File
- includes/
entity_background.fields_crud.inc, line 196 - Fields CRUD functions.
Code
function entity_background_get_field_image($field_name, $cardinality = 1, $uri_scheme = '') {
$field = _entity_background_get_field(array(
'field_name' => $field_name,
'type' => 'image',
'cardinality' => $cardinality,
'settings' => array(
'uri_scheme' => variable_get('file_default_scheme', 'public'),
),
));
if (!empty($uri_scheme)) {
$field['settings']['uri_scheme'] = $uri_scheme;
}
return $field;
}