510 lines
14 KiB
PHP
510 lines
14 KiB
PHP
<?php
|
|
/**
|
|
* @file
|
|
* farm_equipment.features.field.inc
|
|
*/
|
|
|
|
/**
|
|
* Implements hook_field_default_fields().
|
|
*/
|
|
function farm_equipment_field_default_fields() {
|
|
$fields = array();
|
|
|
|
// Exported field: 'farm_asset-equipment-field_farm_equipment_description'.
|
|
$fields['farm_asset-equipment-field_farm_equipment_description'] = array(
|
|
'field_config' => array(
|
|
'active' => 1,
|
|
'cardinality' => 1,
|
|
'deleted' => 0,
|
|
'entity_types' => array(),
|
|
'field_name' => 'field_farm_equipment_description',
|
|
'foreign keys' => array(
|
|
'format' => array(
|
|
'columns' => array(
|
|
'format' => 'format',
|
|
),
|
|
'table' => 'filter_format',
|
|
),
|
|
),
|
|
'indexes' => array(
|
|
'format' => array(
|
|
0 => 'format',
|
|
),
|
|
),
|
|
'locked' => 0,
|
|
'module' => 'text',
|
|
'settings' => array(),
|
|
'translatable' => 0,
|
|
'type' => 'text_long',
|
|
),
|
|
'field_instance' => array(
|
|
'bundle' => 'equipment',
|
|
'default_value' => NULL,
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'above',
|
|
'module' => 'text',
|
|
'settings' => array(),
|
|
'type' => 'text_default',
|
|
'weight' => 0,
|
|
),
|
|
),
|
|
'entity_type' => 'farm_asset',
|
|
'field_name' => 'field_farm_equipment_description',
|
|
'label' => 'Description',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'text_processing' => 0,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'text',
|
|
'settings' => array(
|
|
'rows' => 5,
|
|
),
|
|
'type' => 'text_textarea',
|
|
'weight' => 1,
|
|
),
|
|
),
|
|
);
|
|
|
|
// Exported field: 'farm_asset-equipment-field_farm_files'.
|
|
$fields['farm_asset-equipment-field_farm_files'] = array(
|
|
'field_config' => array(
|
|
'active' => 1,
|
|
'cardinality' => -1,
|
|
'deleted' => 0,
|
|
'entity_types' => array(),
|
|
'field_name' => 'field_farm_files',
|
|
'foreign keys' => array(
|
|
'fid' => array(
|
|
'columns' => array(
|
|
'fid' => 'fid',
|
|
),
|
|
'table' => 'file_managed',
|
|
),
|
|
),
|
|
'indexes' => array(
|
|
'fid' => array(
|
|
0 => 'fid',
|
|
),
|
|
),
|
|
'locked' => 0,
|
|
'module' => 'file',
|
|
'settings' => array(
|
|
'display_default' => 0,
|
|
'display_field' => 0,
|
|
'uri_scheme' => 'public',
|
|
),
|
|
'translatable' => 0,
|
|
'type' => 'file',
|
|
),
|
|
'field_instance' => array(
|
|
'bundle' => 'equipment',
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'above',
|
|
'module' => 'file',
|
|
'settings' => array(),
|
|
'type' => 'file_table',
|
|
'weight' => 2,
|
|
),
|
|
),
|
|
'entity_type' => 'farm_asset',
|
|
'field_name' => 'field_farm_files',
|
|
'label' => 'Files',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'description_field' => 1,
|
|
'file_directory' => '',
|
|
'file_extensions' => 'csv doc docx odt odp ods pdf ppt pptx txt xls xlsx kml kmz zip tar gz',
|
|
'filefield_paths' => array(
|
|
'active_updating' => 0,
|
|
'file_name' => array(
|
|
'options' => array(
|
|
'pathauto' => 0,
|
|
'transliterate' => 0,
|
|
),
|
|
'value' => '[file:ffp-name-only-original].[file:ffp-extension-original]',
|
|
),
|
|
'file_path' => array(
|
|
'options' => array(
|
|
'pathauto' => 0,
|
|
'transliterate' => 0,
|
|
),
|
|
'value' => 'farm/asset/equipment/[farm_asset:id]',
|
|
),
|
|
'retroactive_update' => 0,
|
|
),
|
|
'filefield_paths_enabled' => 1,
|
|
'max_filesize' => '',
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'file',
|
|
'settings' => array(
|
|
'progress_indicator' => 'bar',
|
|
),
|
|
'type' => 'file_generic',
|
|
'weight' => 3,
|
|
),
|
|
),
|
|
);
|
|
|
|
// Exported field: 'farm_asset-equipment-field_farm_images'.
|
|
$fields['farm_asset-equipment-field_farm_images'] = array(
|
|
'field_config' => array(
|
|
'active' => 1,
|
|
'cardinality' => -1,
|
|
'deleted' => 0,
|
|
'entity_types' => array(),
|
|
'field_name' => 'field_farm_images',
|
|
'foreign keys' => array(
|
|
'fid' => array(
|
|
'columns' => array(
|
|
'fid' => 'fid',
|
|
),
|
|
'table' => 'file_managed',
|
|
),
|
|
),
|
|
'indexes' => array(
|
|
'fid' => array(
|
|
0 => 'fid',
|
|
),
|
|
),
|
|
'locked' => 0,
|
|
'module' => 'image',
|
|
'settings' => array(
|
|
'default_image' => 0,
|
|
'uri_scheme' => 'public',
|
|
),
|
|
'translatable' => 0,
|
|
'type' => 'image',
|
|
),
|
|
'field_instance' => array(
|
|
'bundle' => 'equipment',
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'above',
|
|
'module' => 'colorbox',
|
|
'settings' => array(
|
|
'colorbox_caption' => 'auto',
|
|
'colorbox_caption_custom' => '',
|
|
'colorbox_gallery' => 'post',
|
|
'colorbox_gallery_custom' => '',
|
|
'colorbox_image_style' => '',
|
|
'colorbox_multivalue_index' => NULL,
|
|
'colorbox_node_style' => 'thumbnail',
|
|
'colorbox_node_style_first' => 'large',
|
|
),
|
|
'type' => 'colorbox',
|
|
'weight' => 1,
|
|
),
|
|
),
|
|
'entity_type' => 'farm_asset',
|
|
'field_name' => 'field_farm_images',
|
|
'label' => 'Photo(s)',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'alt_field' => 0,
|
|
'default_image' => 0,
|
|
'file_directory' => '',
|
|
'file_extensions' => 'png gif jpg jpeg',
|
|
'filefield_paths' => array(
|
|
'active_updating' => 0,
|
|
'file_name' => array(
|
|
'options' => array(
|
|
'pathauto' => 0,
|
|
'transliterate' => 0,
|
|
),
|
|
'value' => '[file:ffp-name-only-original].[file:ffp-extension-original]',
|
|
),
|
|
'file_path' => array(
|
|
'options' => array(
|
|
'pathauto' => 0,
|
|
'transliterate' => 0,
|
|
),
|
|
'value' => 'farm/equipment/[farm_asset:id]',
|
|
),
|
|
'retroactive_update' => 0,
|
|
),
|
|
'filefield_paths_enabled' => 1,
|
|
'max_filesize' => '',
|
|
'max_resolution' => '',
|
|
'min_resolution' => '',
|
|
'title_field' => 0,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'image',
|
|
'settings' => array(
|
|
'preview_image_style' => 'thumbnail',
|
|
'progress_indicator' => 'bar',
|
|
),
|
|
'type' => 'image_image',
|
|
'weight' => 2,
|
|
),
|
|
),
|
|
);
|
|
|
|
// Exported field: 'log-farm_maintenance-field_farm_equipment'.
|
|
$fields['log-farm_maintenance-field_farm_equipment'] = array(
|
|
'field_config' => array(
|
|
'active' => 1,
|
|
'cardinality' => 1,
|
|
'deleted' => 0,
|
|
'entity_types' => array(),
|
|
'field_name' => 'field_farm_equipment',
|
|
'foreign keys' => array(
|
|
'farm_asset' => array(
|
|
'columns' => array(
|
|
'target_id' => 'id',
|
|
),
|
|
'table' => 'farm_asset',
|
|
),
|
|
),
|
|
'indexes' => array(
|
|
'target_id' => array(
|
|
0 => 'target_id',
|
|
),
|
|
),
|
|
'locked' => 0,
|
|
'module' => 'entityreference',
|
|
'settings' => array(
|
|
'handler' => 'base',
|
|
'handler_settings' => array(
|
|
'behaviors' => array(
|
|
'views-select-list' => array(
|
|
'status' => 0,
|
|
),
|
|
),
|
|
'sort' => array(
|
|
'type' => 'none',
|
|
),
|
|
'target_bundles' => array(
|
|
'equipment' => 'equipment',
|
|
),
|
|
),
|
|
'target_type' => 'farm_asset',
|
|
),
|
|
'translatable' => 0,
|
|
'type' => 'entityreference',
|
|
),
|
|
'field_instance' => array(
|
|
'bundle' => 'farm_maintenance',
|
|
'default_value' => NULL,
|
|
'deleted' => 0,
|
|
'description' => 'What equipment is being maintained?',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'inline',
|
|
'module' => 'entityreference',
|
|
'settings' => array(
|
|
'link' => 1,
|
|
),
|
|
'type' => 'entityreference_label',
|
|
'weight' => 0,
|
|
),
|
|
),
|
|
'entity_type' => 'log',
|
|
'field_name' => 'field_farm_equipment',
|
|
'label' => 'Equipment',
|
|
'required' => 1,
|
|
'settings' => array(
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'entityreference',
|
|
'settings' => array(
|
|
'match_operator' => 'CONTAINS',
|
|
'path' => '',
|
|
'size' => 60,
|
|
),
|
|
'type' => 'entityreference_autocomplete',
|
|
'weight' => 2,
|
|
),
|
|
),
|
|
);
|
|
|
|
// Exported field: 'log-farm_maintenance-field_farm_images'.
|
|
$fields['log-farm_maintenance-field_farm_images'] = array(
|
|
'field_config' => array(
|
|
'active' => 1,
|
|
'cardinality' => -1,
|
|
'deleted' => 0,
|
|
'entity_types' => array(),
|
|
'field_name' => 'field_farm_images',
|
|
'foreign keys' => array(
|
|
'fid' => array(
|
|
'columns' => array(
|
|
'fid' => 'fid',
|
|
),
|
|
'table' => 'file_managed',
|
|
),
|
|
),
|
|
'indexes' => array(
|
|
'fid' => array(
|
|
0 => 'fid',
|
|
),
|
|
),
|
|
'locked' => 0,
|
|
'module' => 'image',
|
|
'settings' => array(
|
|
'default_image' => 0,
|
|
'uri_scheme' => 'public',
|
|
),
|
|
'translatable' => 0,
|
|
'type' => 'image',
|
|
),
|
|
'field_instance' => array(
|
|
'bundle' => 'farm_maintenance',
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'above',
|
|
'module' => 'colorbox',
|
|
'settings' => array(
|
|
'colorbox_caption' => 'auto',
|
|
'colorbox_caption_custom' => '',
|
|
'colorbox_gallery' => 'post',
|
|
'colorbox_gallery_custom' => '',
|
|
'colorbox_image_style' => '',
|
|
'colorbox_multivalue_index' => NULL,
|
|
'colorbox_node_style' => 'thumbnail',
|
|
'colorbox_node_style_first' => 'large',
|
|
),
|
|
'type' => 'colorbox',
|
|
'weight' => 3,
|
|
),
|
|
),
|
|
'entity_type' => 'log',
|
|
'field_name' => 'field_farm_images',
|
|
'label' => 'Photo(s)',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'alt_field' => 0,
|
|
'default_image' => 0,
|
|
'file_directory' => '',
|
|
'file_extensions' => 'png gif jpg jpeg',
|
|
'filefield_paths' => array(
|
|
'active_updating' => 0,
|
|
'file_name' => array(
|
|
'options' => array(
|
|
'pathauto' => 0,
|
|
'transliterate' => 0,
|
|
),
|
|
'value' => '[file:ffp-name-only-original].[file:ffp-extension-original]',
|
|
),
|
|
'file_path' => array(
|
|
'options' => array(
|
|
'pathauto' => 0,
|
|
'transliterate' => 0,
|
|
),
|
|
'value' => 'farm/log/maintenance/[log:id]',
|
|
),
|
|
'retroactive_update' => 0,
|
|
),
|
|
'filefield_paths_enabled' => 1,
|
|
'max_filesize' => '',
|
|
'max_resolution' => '',
|
|
'min_resolution' => '',
|
|
'title_field' => 0,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'image',
|
|
'settings' => array(
|
|
'preview_image_style' => 'thumbnail',
|
|
'progress_indicator' => 'bar',
|
|
),
|
|
'type' => 'image_image',
|
|
'weight' => 4,
|
|
),
|
|
),
|
|
);
|
|
|
|
// Exported field: 'log-farm_maintenance-field_farm_notes'.
|
|
$fields['log-farm_maintenance-field_farm_notes'] = array(
|
|
'field_config' => array(
|
|
'active' => 1,
|
|
'cardinality' => 1,
|
|
'deleted' => 0,
|
|
'entity_types' => array(),
|
|
'field_name' => 'field_farm_notes',
|
|
'foreign keys' => array(
|
|
'format' => array(
|
|
'columns' => array(
|
|
'format' => 'format',
|
|
),
|
|
'table' => 'filter_format',
|
|
),
|
|
),
|
|
'indexes' => array(
|
|
'format' => array(
|
|
0 => 'format',
|
|
),
|
|
),
|
|
'locked' => 0,
|
|
'module' => 'text',
|
|
'settings' => array(),
|
|
'translatable' => 0,
|
|
'type' => 'text_long',
|
|
),
|
|
'field_instance' => array(
|
|
'bundle' => 'farm_maintenance',
|
|
'default_value' => NULL,
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'inline',
|
|
'module' => 'text',
|
|
'settings' => array(),
|
|
'type' => 'text_default',
|
|
'weight' => 2,
|
|
),
|
|
),
|
|
'entity_type' => 'log',
|
|
'field_name' => 'field_farm_notes',
|
|
'label' => 'Notes',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'text_processing' => 0,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'text',
|
|
'settings' => array(
|
|
'rows' => 5,
|
|
),
|
|
'type' => 'text_textarea',
|
|
'weight' => 3,
|
|
),
|
|
),
|
|
);
|
|
|
|
// Translatables
|
|
// Included for use with string extractors like potx.
|
|
t('Description');
|
|
t('Equipment');
|
|
t('Files');
|
|
t('Notes');
|
|
t('Photo(s)');
|
|
t('What equipment is being maintained?');
|
|
|
|
return $fields;
|
|
}
|