View source
<?php
function example_rule_promotion_syncronization_field_default_fields() {
$fields = array();
$fields['node-article_promotion-field_promotion_article'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_promotion_article',
'foreign keys' => array(
'nid' => array(
'columns' => array(
'nid' => 'nid',
),
'table' => 'node',
),
),
'indexes' => array(
'nid' => array(
0 => 'nid',
),
),
'module' => 'node_reference',
'settings' => array(
'referenceable_types' => array(
'article' => 'article',
'article_promotion' => 0,
'page' => 0,
),
'view' => array(
'args' => array(),
'display_name' => '',
'view_name' => '',
),
),
'translatable' => '0',
'type' => 'node_reference',
),
'field_instance' => array(
'bundle' => 'article_promotion',
'default_value' => NULL,
'deleted' => '0',
'description' => 'The article this promotion belogs to.',
'display' => array(
'default' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => '2',
),
),
'entity_type' => 'node',
'field_name' => 'field_promotion_article',
'label' => 'Article',
'required' => 1,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'node_reference',
'settings' => array(
'autocomplete_match' => 'contains',
'autocomplete_path' => 'node_reference/autocomplete',
'size' => '60',
),
'type' => 'node_reference_autocomplete',
'weight' => '3',
),
),
);
$fields['node-article_promotion-field_promotion_image'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_promotion_image',
'foreign keys' => array(
'fid' => array(
'columns' => array(
'fid' => 'fid',
),
'table' => 'file_managed',
),
),
'indexes' => array(
'fid' => array(
0 => 'fid',
),
),
'module' => 'image',
'settings' => array(
'default_image' => 0,
'uri_scheme' => 'public',
),
'translatable' => '0',
'type' => 'image',
),
'field_instance' => array(
'bundle' => 'article_promotion',
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'image',
'settings' => array(
'image_link' => 'content',
'image_style' => 'medium',
),
'type' => 'image',
'weight' => '0',
),
),
'entity_type' => 'node',
'field_name' => 'field_promotion_image',
'label' => 'Image',
'required' => 0,
'settings' => array(
'alt_field' => 1,
'file_directory' => '',
'file_extensions' => 'png gif jpg jpeg',
'max_filesize' => '',
'max_resolution' => '',
'min_resolution' => '',
'title_field' => 1,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'image',
'settings' => array(
'preview_image_style' => 'thumbnail',
'progress_indicator' => 'throbber',
),
'type' => 'image_image',
'weight' => '2',
),
),
);
$fields['node-article_promotion-field_promotion_text'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_promotion_text',
'foreign keys' => array(
'format' => array(
'columns' => array(
'format' => 'format',
),
'table' => 'filter_format',
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'module' => 'text',
'settings' => array(),
'translatable' => '0',
'type' => 'text_long',
),
'field_instance' => array(
'bundle' => 'article_promotion',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => '1',
),
),
'entity_type' => 'node',
'field_name' => 'field_promotion_text',
'label' => 'Text',
'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' => '1',
),
),
);
t('Article');
t('Image');
t('Text');
t('The article this promotion belogs to.');
return $fields;
}