449 lines
13 KiB
PHP
449 lines
13 KiB
PHP
<?php
|
|
/**
|
|
* @file
|
|
* farm_equipment.features.field_instance.inc
|
|
*/
|
|
|
|
/**
|
|
* Implements hook_field_default_field_instances().
|
|
*/
|
|
function farm_equipment_field_default_field_instances() {
|
|
$field_instances = array();
|
|
|
|
// Exported field_instance: 'farm_asset-equipment-field_farm_description'.
|
|
$field_instances['farm_asset-equipment-field_farm_description'] = array(
|
|
'bundle' => 'equipment',
|
|
'default_value' => NULL,
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'above',
|
|
'module' => 'text',
|
|
'settings' => array(),
|
|
'type' => 'text_default',
|
|
'weight' => 3,
|
|
),
|
|
),
|
|
'entity_type' => 'farm_asset',
|
|
'field_name' => 'field_farm_description',
|
|
'label' => 'Description',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'text_processing' => 1,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'text',
|
|
'settings' => array(
|
|
'rows' => 5,
|
|
),
|
|
'type' => 'text_textarea',
|
|
'weight' => 7,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'farm_asset-equipment-field_farm_files'.
|
|
$field_instances['farm_asset-equipment-field_farm_files'] = array(
|
|
'bundle' => 'equipment',
|
|
'default_value' => array(),
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'above',
|
|
'module' => 'file',
|
|
'settings' => array(),
|
|
'type' => 'file_table',
|
|
'weight' => 5,
|
|
),
|
|
),
|
|
'entity_type' => 'farm_asset',
|
|
'field_name' => 'field_farm_files',
|
|
'label' => 'Files',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'description_field' => 1,
|
|
'file_directory' => 'farm/asset/equipment',
|
|
'file_extensions' => 'csv doc docx odt odp ods pdf ppt pptx txt xls xlsx kml kmz zip tar gz',
|
|
'max_filesize' => '',
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'multiupload_filefield_widget',
|
|
'settings' => array(
|
|
'progress_indicator' => 'bar',
|
|
),
|
|
'type' => 'file_mfw',
|
|
'weight' => 9,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'farm_asset-equipment-field_farm_images'.
|
|
$field_instances['farm_asset-equipment-field_farm_images'] = array(
|
|
'bundle' => 'equipment',
|
|
'default_value' => array(),
|
|
'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' => 4,
|
|
),
|
|
),
|
|
'entity_type' => 'farm_asset',
|
|
'field_name' => 'field_farm_images',
|
|
'label' => 'Photos',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'alt_field' => 0,
|
|
'default_image' => 0,
|
|
'file_directory' => 'farm/asset/equipment',
|
|
'file_extensions' => 'png gif jpg jpeg',
|
|
'max_filesize' => '',
|
|
'max_resolution' => '',
|
|
'min_resolution' => '',
|
|
'title_field' => 0,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'multiupload_imagefield_widget',
|
|
'settings' => array(
|
|
'preview_image_style' => 'thumbnail',
|
|
'progress_indicator' => 'bar',
|
|
),
|
|
'type' => 'image_miw',
|
|
'weight' => 8,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'farm_asset-equipment-field_farm_manufacturer'.
|
|
$field_instances['farm_asset-equipment-field_farm_manufacturer'] = array(
|
|
'bundle' => 'equipment',
|
|
'default_value' => NULL,
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'inline',
|
|
'module' => 'text',
|
|
'settings' => array(),
|
|
'type' => 'text_default',
|
|
'weight' => 0,
|
|
),
|
|
),
|
|
'entity_type' => 'farm_asset',
|
|
'field_name' => 'field_farm_manufacturer',
|
|
'label' => 'Manufacturer',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'text_processing' => 0,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'text',
|
|
'settings' => array(
|
|
'size' => 60,
|
|
),
|
|
'type' => 'text_textfield',
|
|
'weight' => 4,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'farm_asset-equipment-field_farm_model'.
|
|
$field_instances['farm_asset-equipment-field_farm_model'] = array(
|
|
'bundle' => 'equipment',
|
|
'default_value' => NULL,
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'inline',
|
|
'module' => 'text',
|
|
'settings' => array(),
|
|
'type' => 'text_default',
|
|
'weight' => 1,
|
|
),
|
|
),
|
|
'entity_type' => 'farm_asset',
|
|
'field_name' => 'field_farm_model',
|
|
'label' => 'Model',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'text_processing' => 0,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'text',
|
|
'settings' => array(
|
|
'size' => 60,
|
|
),
|
|
'type' => 'text_textfield',
|
|
'weight' => 5,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'farm_asset-equipment-field_farm_serial_number'.
|
|
$field_instances['farm_asset-equipment-field_farm_serial_number'] = array(
|
|
'bundle' => 'equipment',
|
|
'default_value' => NULL,
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'inline',
|
|
'module' => 'text',
|
|
'settings' => array(),
|
|
'type' => 'text_default',
|
|
'weight' => 2,
|
|
),
|
|
),
|
|
'entity_type' => 'farm_asset',
|
|
'field_name' => 'field_farm_serial_number',
|
|
'label' => 'Serial Number',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'text_processing' => 0,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'text',
|
|
'settings' => array(
|
|
'size' => 60,
|
|
),
|
|
'type' => 'text_textfield',
|
|
'weight' => 6,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'log-farm_maintenance-field_farm_asset'.
|
|
$field_instances['log-farm_maintenance-field_farm_asset'] = array(
|
|
'bundle' => 'farm_maintenance',
|
|
'deleted' => 0,
|
|
'description' => 'What assets do this maintenance log pertain to?',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'inline',
|
|
'module' => 'entityreference',
|
|
'settings' => array(
|
|
'bypass_access' => FALSE,
|
|
'link' => 1,
|
|
),
|
|
'type' => 'entityreference_label',
|
|
'weight' => 0,
|
|
),
|
|
),
|
|
'entity_type' => 'log',
|
|
'field_name' => 'field_farm_asset',
|
|
'label' => 'Assets',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'entityreference_view_widget',
|
|
'settings' => array(
|
|
'allow_duplicates' => 0,
|
|
'close_modal' => 1,
|
|
'pass_argument' => 1,
|
|
'pass_arguments' => '',
|
|
'rendered_entity' => 0,
|
|
'view' => 'farm_asset_entityreference_view|entityreference_view_widget',
|
|
'view_mode' => 'full',
|
|
),
|
|
'type' => 'entityreference_view_widget',
|
|
'weight' => 2,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'log-farm_maintenance-field_farm_files'.
|
|
$field_instances['log-farm_maintenance-field_farm_files'] = array(
|
|
'bundle' => 'farm_maintenance',
|
|
'default_value' => array(),
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'above',
|
|
'module' => 'file',
|
|
'settings' => array(),
|
|
'type' => 'file_table',
|
|
'weight' => 3,
|
|
),
|
|
),
|
|
'entity_type' => 'log',
|
|
'field_name' => 'field_farm_files',
|
|
'label' => 'Files',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'description_field' => 1,
|
|
'file_directory' => 'farm/log/maintenance',
|
|
'file_extensions' => 'csv doc docx odt odp ods pdf ppt pptx txt xls xlsx kml kmz zip tar gz',
|
|
'max_filesize' => '',
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'multiupload_filefield_widget',
|
|
'settings' => array(
|
|
'progress_indicator' => 'bar',
|
|
),
|
|
'type' => 'file_mfw',
|
|
'weight' => 6,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'log-farm_maintenance-field_farm_images'.
|
|
$field_instances['log-farm_maintenance-field_farm_images'] = array(
|
|
'bundle' => 'farm_maintenance',
|
|
'default_value' => array(),
|
|
'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' => 2,
|
|
),
|
|
),
|
|
'entity_type' => 'log',
|
|
'field_name' => 'field_farm_images',
|
|
'label' => 'Photos',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'alt_field' => 0,
|
|
'default_image' => 0,
|
|
'file_directory' => 'farm/log/maintenance',
|
|
'file_extensions' => 'png gif jpg jpeg',
|
|
'max_filesize' => '',
|
|
'max_resolution' => '',
|
|
'min_resolution' => '',
|
|
'title_field' => 0,
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 1,
|
|
'module' => 'multiupload_imagefield_widget',
|
|
'settings' => array(
|
|
'preview_image_style' => 'thumbnail',
|
|
'progress_indicator' => 'bar',
|
|
),
|
|
'type' => 'image_miw',
|
|
'weight' => 5,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'log-farm_maintenance-field_farm_movement'.
|
|
$field_instances['log-farm_maintenance-field_farm_movement'] = array(
|
|
'bundle' => 'farm_maintenance',
|
|
'default_value' => NULL,
|
|
'deleted' => 0,
|
|
'description' => 'Use these fields to record a movement with this log entry. This will be used to define the location of any referenced assets. The current location of any asset is determined by the most recently completed movement log. Only the "to" field is required.',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'hidden',
|
|
'module' => 'field_collection',
|
|
'settings' => array(
|
|
'view_mode' => 'full',
|
|
),
|
|
'type' => 'field_collection_fields',
|
|
'weight' => 5,
|
|
),
|
|
),
|
|
'entity_type' => 'log',
|
|
'field_name' => 'field_farm_movement',
|
|
'label' => 'Movement',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'user_register_form' => FALSE,
|
|
),
|
|
'widget' => array(
|
|
'active' => 0,
|
|
'module' => 'field_collection',
|
|
'settings' => array(),
|
|
'type' => 'field_collection_embed',
|
|
'weight' => 3,
|
|
),
|
|
);
|
|
|
|
// Exported field_instance: 'log-farm_maintenance-field_farm_notes'.
|
|
$field_instances['log-farm_maintenance-field_farm_notes'] = array(
|
|
'bundle' => 'farm_maintenance',
|
|
'default_value' => NULL,
|
|
'deleted' => 0,
|
|
'description' => '',
|
|
'display' => array(
|
|
'default' => array(
|
|
'label' => 'inline',
|
|
'module' => 'text',
|
|
'settings' => array(),
|
|
'type' => 'text_default',
|
|
'weight' => 1,
|
|
),
|
|
),
|
|
'entity_type' => 'log',
|
|
'field_name' => 'field_farm_notes',
|
|
'label' => 'Notes',
|
|
'required' => 0,
|
|
'settings' => array(
|
|
'text_processing' => 1,
|
|
'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('Assets');
|
|
t('Description');
|
|
t('Files');
|
|
t('Manufacturer');
|
|
t('Model');
|
|
t('Movement');
|
|
t('Notes');
|
|
t('Photos');
|
|
t('Serial Number');
|
|
t('Use these fields to record a movement with this log entry. This will be used to define the location of any referenced assets. The current location of any asset is determined by the most recently completed movement log. Only the "to" field is required.');
|
|
t('What assets do this maintenance log pertain to?');
|
|
|
|
return $field_instances;
|
|
}
|