diff --git a/entityreference.info b/entityreference.info index 9772c69..a6019ac 100644 --- a/entityreference.info +++ b/entityreference.info @@ -22,3 +22,4 @@ files[] = tests/entityreference.handlers.test files[] = tests/entityreference.taxonomy.test files[] = tests/entityreference.admin.test files[] = tests/entityreference.feeds.test +files[] = tests/entityreference.entity_translation.test diff --git a/tests/entityreference.entity_translation.test b/tests/entityreference.entity_translation.test new file mode 100644 index 0000000..3af8467 --- /dev/null +++ b/tests/entityreference.entity_translation.test @@ -0,0 +1,166 @@ + 'Entity Translation integration', + 'description' => 'Test integration between Entity Reference and Entity Translation.', + 'group' => 'Entity Reference', + 'dependencies' => array( + 'entity_translation', + 'features', + 'strongarm', + 'title', + ), + ); + } + + /** + * @{inheritdoc} + */ + public function setUp() { + parent::setUp(); + module_enable(array('entityreference_entity_translation_test'), TRUE); + $this->resetAll(); + + $permissions[] = 'access content'; + $permissions[] = 'administer site configuration'; + $permissions[] = 'administer content types'; + $permissions[] = 'administer nodes'; + $permissions[] = 'bypass node access'; + $permissions[] = 'administer entity translation'; + $permissions[] = 'translate any entity'; + + // Create an admin user and log in. + $this->administrator = $this->drupalCreateUser($permissions); + $this->drupalLogin($this->administrator); + + $this->data['first'] = array( + 'en' => 'First article in English', + 'it' => 'First article in Italian', + ); + $this->data['second'] = array( + 'en' => 'Second article in English', + 'it' => 'Second article in Italian', + ); + $this->data['third'] = array( + 'en' => 'Third article in English', + 'it' => 'Third article in Italian', + ); + + foreach ($this->data as $id => $article) { + $this->nodes[$id] = $this->createTranslatableArticle($article); + } + + // Make sure that the first node references the other two. + $node = $this->nodes['first']; + $node->field_reference[LANGUAGE_NONE][0]['target_id'] = $this->nodes['second']->nid; + $node->field_reference[LANGUAGE_NONE][1]['target_id'] = $this->nodes['third']->nid; + node_save($node); + } + + /** + * Test that "Rendered entity" formatter is language aware. + */ + public function testRenderedEntityFormatter() { + $node = $this->nodes['first']; + + $this->drupalGet("node/$node->nid"); + foreach ($this->data as $id => $article) { + $this->assertText($this->data[$id]['en']); + } + + $this->clickLink('Italiano'); + foreach ($this->data as $id => $article) { + $this->assertText($this->data[$id]['it']); + } + } + + /** + * Create translatable article content. + * + * @param array $translations + * Array of translations, keyed by language code, "en" is required. + * + * @return object + * Created node object. + */ + protected function createTranslatableArticle(array $translations) { + + $values = array(); + $values['title'] = $translations['en']; + $values['title_field']['en'][0]['value'] = $translations['en']; + $values['body']['en'][0]['value'] = $translations['en']; + $values['language'] = 'en'; + $values['type'] = 'article'; + unset($translations['en']); + + $node = $this->drupalCreateNode($values); + + $translation = array( + 'translate' => 0, + 'status' => TRUE, + 'source' => $node->language, + ); + + foreach ($translations as $language => $node_translation) { + $translation_handler = entity_translation_get_handler('node', $node); + $translation_handler->loadTranslations(); + + $translation['uid'] = $node->uid; + $translation['created'] = $node->created; + $translation['changed'] = $node->changed; + $translation['language'] = $language; + + $values = array(); + $values['title_field'][$language][0]['value'] = $node_translation; + $values['body'][$language][0]['value'] = $node_translation; + + // Add the new translation and store it. + $translation_handler->setTranslation($translation, $values); + + // Preserve original language setting. + $node->field_language = $node->language; + $node->language = $node->translations->original; + + // Save entity. + node_save($node); + } + + return $node; + } + +} diff --git a/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.field_base.inc b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.field_base.inc new file mode 100644 index 0000000..8c4b4be --- /dev/null +++ b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.field_base.inc @@ -0,0 +1,140 @@ + 1, + 'cardinality' => 1, + 'deleted' => 0, + 'entity_types' => array( + 0 => 'node', + ), + 'field_name' => 'body', + 'indexes' => array( + 'format' => array( + 0 => 'format', + ), + ), + 'locked' => 0, + 'module' => 'text', + 'settings' => array( + 'entity_translation_sync' => FALSE, + ), + 'translatable' => 1, + 'type' => 'text_with_summary', + ); + + // Exported field_base: 'field_image'. + $field_bases['field_image'] = array( + 'active' => 1, + 'cardinality' => 1, + 'deleted' => 0, + 'entity_types' => array(), + 'field_name' => 'field_image', + 'indexes' => array( + 'fid' => array( + 0 => 'fid', + ), + ), + 'locked' => 0, + 'module' => 'image', + 'settings' => array( + 'default_image' => FALSE, + 'entity_translation_sync' => array( + 0 => 'fid', + ), + 'uri_scheme' => 'public', + ), + 'translatable' => 0, + 'type' => 'image', + ); + + // Exported field_base: 'field_reference'. + $field_bases['field_reference'] = array( + 'active' => 1, + 'cardinality' => -1, + 'deleted' => 0, + 'entity_types' => array(), + 'field_name' => 'field_reference', + 'indexes' => array( + 'target_id' => array( + 0 => 'target_id', + ), + ), + 'locked' => 0, + 'module' => 'entityreference', + 'settings' => array( + 'entity_translation_sync' => FALSE, + 'handler' => 'base', + 'handler_settings' => array( + 'sort' => array( + 'type' => 'none', + ), + 'target_bundles' => array(), + ), + 'target_type' => 'node', + ), + 'translatable' => 0, + 'type' => 'entityreference', + ); + + // Exported field_base: 'field_tags'. + $field_bases['field_tags'] = array( + 'active' => 1, + 'cardinality' => -1, + 'deleted' => 0, + 'entity_types' => array(), + 'field_name' => 'field_tags', + 'indexes' => array( + 'tid' => array( + 0 => 'tid', + ), + ), + 'locked' => 0, + 'module' => 'taxonomy', + 'settings' => array( + 'allowed_values' => array( + 0 => array( + 'vocabulary' => 'tags', + 'parent' => 0, + ), + ), + 'entity_translation_sync' => FALSE, + ), + 'translatable' => 0, + 'type' => 'taxonomy_term_reference', + ); + + // Exported field_base: 'title_field'. + $field_bases['title_field'] = array( + 'active' => 1, + 'cardinality' => 1, + 'deleted' => 0, + 'entity_types' => array(), + 'field_name' => 'title_field', + 'indexes' => array( + 'format' => array( + 0 => 'format', + ), + ), + 'locked' => 0, + 'module' => 'text', + 'settings' => array( + 'entity_translation_sync' => FALSE, + 'max_length' => 255, + ), + 'translatable' => 1, + 'type' => 'text', + ); + + return $field_bases; +} diff --git a/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.field_instance.inc b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.field_instance.inc new file mode 100644 index 0000000..dbfc3de --- /dev/null +++ b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.field_instance.inc @@ -0,0 +1,289 @@ + 'article', + 'default_value' => NULL, + 'deleted' => 0, + 'description' => '', + 'display' => array( + 'default' => array( + 'label' => 'hidden', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => 0, + ), + 'full' => array( + 'label' => 'hidden', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => 0, + ), + 'teaser' => array( + 'label' => 'hidden', + 'module' => 'text', + 'settings' => array( + 'trim_length' => 600, + ), + 'type' => 'text_summary_or_trimmed', + 'weight' => 1, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'body', + 'label' => 'Body', + 'required' => 0, + 'settings' => array( + 'display_summary' => 1, + 'entity_translation_sync' => FALSE, + 'text_processing' => 1, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'text', + 'settings' => array( + 'rows' => 20, + 'summary_rows' => 5, + ), + 'type' => 'text_textarea_with_summary', + 'weight' => -4, + ), + ); + + // Exported field_instance: 'node-article-field_image'. + $field_instances['node-article-field_image'] = array( + 'bundle' => 'article', + 'deleted' => 0, + 'description' => 'Upload an image to go with this article.', + 'display' => array( + 'default' => array( + 'label' => 'hidden', + 'module' => 'image', + 'settings' => array( + 'image_link' => '', + 'image_style' => 'large', + ), + 'type' => 'image', + 'weight' => -1, + ), + 'full' => array( + 'label' => 'hidden', + 'module' => 'image', + 'settings' => array( + 'image_link' => '', + 'image_style' => 'large', + ), + 'type' => 'image', + 'weight' => -1, + ), + 'teaser' => array( + 'label' => 'hidden', + 'module' => 'image', + 'settings' => array( + 'image_link' => 'content', + 'image_style' => 'medium', + ), + 'type' => 'image', + 'weight' => 2, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_image', + 'label' => 'Image', + 'required' => FALSE, + 'settings' => array( + 'alt_field' => TRUE, + 'default_image' => 0, + 'entity_translation_sync' => FALSE, + 'file_directory' => 'field/image', + 'file_extensions' => 'png gif jpg jpeg', + 'max_filesize' => '', + 'max_resolution' => '', + 'min_resolution' => '', + 'title_field' => '', + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'module' => 'image', + 'settings' => array( + 'preview_image_style' => 'thumbnail', + 'progress_indicator' => 'throbber', + ), + 'type' => 'image_image', + 'weight' => -1, + ), + ); + + // Exported field_instance: 'node-article-field_reference'. + $field_instances['node-article-field_reference'] = array( + 'bundle' => 'article', + 'default_value' => NULL, + 'deleted' => 0, + 'description' => '', + 'display' => array( + 'default' => array( + 'label' => 'above', + 'module' => 'entityreference', + 'settings' => array( + 'link' => FALSE, + ), + 'type' => 'entityreference_label', + 'weight' => 12, + ), + 'full' => array( + 'label' => 'above', + 'module' => 'entityreference', + 'settings' => array( + 'links' => 0, + 'view_mode' => 'teaser', + ), + 'type' => 'entityreference_entity_view', + 'weight' => 12, + ), + 'teaser' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 4, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_reference', + 'label' => 'Reference', + 'required' => 0, + 'settings' => array( + 'entity_translation_sync' => FALSE, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'active' => 1, + 'module' => 'options', + 'settings' => array(), + 'type' => 'options_buttons', + 'weight' => 0, + ), + ); + + // Exported field_instance: 'node-article-field_tags'. + $field_instances['node-article-field_tags'] = array( + 'bundle' => 'article', + 'default_value' => NULL, + 'deleted' => 0, + 'description' => 'Enter a comma-separated list of words to describe your content.', + 'display' => array( + 'default' => array( + 'label' => 'above', + 'module' => 'taxonomy', + 'settings' => array(), + 'type' => 'taxonomy_term_reference_link', + 'weight' => 10, + ), + 'full' => array( + 'label' => 'above', + 'module' => 'taxonomy', + 'settings' => array(), + 'type' => 'taxonomy_term_reference_link', + 'weight' => 10, + ), + 'teaser' => array( + 'label' => 'above', + 'module' => 'taxonomy', + 'settings' => array(), + 'type' => 'taxonomy_term_reference_link', + 'weight' => 3, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'field_tags', + 'label' => 'Tags', + 'required' => FALSE, + 'settings' => array( + 'entity_translation_sync' => FALSE, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'module' => 'taxonomy', + 'settings' => array( + 'autocomplete_path' => 'taxonomy/autocomplete', + 'size' => 60, + ), + 'type' => 'taxonomy_autocomplete', + 'weight' => -4, + ), + ); + + // Exported field_instance: 'node-article-title_field'. + $field_instances['node-article-title_field'] = array( + 'bundle' => 'article', + 'default_value' => NULL, + 'deleted' => 0, + 'description' => '', + 'display' => array( + 'default' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 11, + ), + 'full' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 11, + ), + 'teaser' => array( + 'label' => 'above', + 'module' => 'text', + 'settings' => array(), + 'type' => 'text_default', + 'weight' => 0, + ), + ), + 'entity_type' => 'node', + 'field_name' => 'title_field', + 'label' => 'Title', + 'required' => TRUE, + 'settings' => array( + 'entity_translation_sync' => FALSE, + 'hide_label' => array( + 'entity' => FALSE, + 'page' => FALSE, + ), + 'text_processing' => 0, + 'user_register_form' => FALSE, + ), + 'widget' => array( + 'module' => 'text', + 'settings' => array( + 'size' => 60, + ), + 'type' => 'text_textfield', + 'weight' => -5, + ), + ); + + // Translatables + // Included for use with string extractors like potx. + t('Body'); + t('Enter a comma-separated list of words to describe your content.'); + t('Image'); + t('Reference'); + t('Tags'); + t('Title'); + t('Upload an image to go with this article.'); + + return $field_instances; +} diff --git a/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.inc b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.inc new file mode 100644 index 0000000..5973dd8 --- /dev/null +++ b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.inc @@ -0,0 +1,32 @@ + "1"); + } +} + +/** + * Implements hook_node_info(). + */ +function entityreference_entity_translation_test_node_info() { + $items = array( + 'article' => array( + 'name' => t('Article'), + 'base' => 'node_content', + 'description' => t('Use articles for time-sensitive content like news, press releases or blog posts.'), + 'has_title' => '1', + 'title_label' => t('Title'), + 'help' => '', + ), + ); + drupal_alter('node_info', $items); + return $items; +} diff --git a/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.language.inc b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.language.inc new file mode 100644 index 0000000..54d2da2 --- /dev/null +++ b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.language.inc @@ -0,0 +1,40 @@ + 'en', + 'name' => 'English', + 'native' => 'English', + 'direction' => 0, + 'enabled' => 1, + 'plurals' => 0, + 'formula' => '', + 'domain' => '', + 'prefix' => '', + 'weight' => 0, + ); + // Exported language: it. + $languages['it'] = array( + 'language' => 'it', + 'name' => 'Italian', + 'native' => 'Italiano', + 'direction' => 0, + 'enabled' => 1, + 'plurals' => 0, + 'formula' => '', + 'domain' => '', + 'prefix' => 'it', + 'weight' => 0, + ); + return $languages; +} diff --git a/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.taxonomy.inc b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.taxonomy.inc new file mode 100644 index 0000000..968ed85 --- /dev/null +++ b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.taxonomy.inc @@ -0,0 +1,36 @@ + array( + 'name' => 'Tags', + 'machine_name' => 'tags', + 'description' => 'Use tags to group articles on similar topics into categories.', + 'hierarchy' => 0, + 'module' => 'taxonomy', + 'weight' => 0, + 'rdf_mapping' => array( + 'rdftype' => array( + 0 => 'skos:ConceptScheme', + ), + 'name' => array( + 'predicates' => array( + 0 => 'dc:title', + ), + ), + 'description' => array( + 'predicates' => array( + 0 => 'rdfs:comment', + ), + ), + ), + ), + ); +} diff --git a/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.user_permission.inc b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.user_permission.inc new file mode 100644 index 0000000..1970247 --- /dev/null +++ b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.features.user_permission.inc @@ -0,0 +1,59 @@ + 'create article content', + 'roles' => array( + 'administrator' => 'administrator', + ), + 'module' => 'node', + ); + + // Exported permission: 'delete any article content'. + $permissions['delete any article content'] = array( + 'name' => 'delete any article content', + 'roles' => array( + 'administrator' => 'administrator', + ), + 'module' => 'node', + ); + + // Exported permission: 'delete own article content'. + $permissions['delete own article content'] = array( + 'name' => 'delete own article content', + 'roles' => array( + 'administrator' => 'administrator', + ), + 'module' => 'node', + ); + + // Exported permission: 'edit any article content'. + $permissions['edit any article content'] = array( + 'name' => 'edit any article content', + 'roles' => array( + 'administrator' => 'administrator', + ), + 'module' => 'node', + ); + + // Exported permission: 'edit own article content'. + $permissions['edit own article content'] = array( + 'name' => 'edit own article content', + 'roles' => array( + 'administrator' => 'administrator', + ), + 'module' => 'node', + ); + + return $permissions; +} diff --git a/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.info b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.info new file mode 100644 index 0000000..f803926 --- /dev/null +++ b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.info @@ -0,0 +1,51 @@ +name = Entityreference - Entity Translation tests +description = Support module for the Entityreference - Entity Translation integration tests. +core = 7.x +package = Testing +dependencies[] = entity_translation +dependencies[] = entityreference +dependencies[] = features +dependencies[] = image +dependencies[] = locale +dependencies[] = strongarm +dependencies[] = taxonomy +dependencies[] = title +features[ctools][] = strongarm:strongarm:1 +features[features_api][] = api:2 +features[field_base][] = body +features[field_base][] = field_image +features[field_base][] = field_reference +features[field_base][] = field_tags +features[field_base][] = title_field +features[field_instance][] = node-article-body +features[field_instance][] = node-article-field_image +features[field_instance][] = node-article-field_reference +features[field_instance][] = node-article-field_tags +features[field_instance][] = node-article-title_field +features[language][] = en +features[language][] = it +features[node][] = article +features[taxonomy][] = tags +features[user_permission][] = create article content +features[user_permission][] = delete any article content +features[user_permission][] = delete own article content +features[user_permission][] = edit any article content +features[user_permission][] = edit own article content +features[variable][] = comment_anonymous_article +features[variable][] = comment_article +features[variable][] = comment_default_mode_article +features[variable][] = comment_default_per_page_article +features[variable][] = comment_form_location_article +features[variable][] = comment_preview_article +features[variable][] = comment_subject_field_article +features[variable][] = entity_translation_comment_filter_article +features[variable][] = entity_translation_hide_translation_links_article +features[variable][] = entity_translation_node_metadata_article +features[variable][] = field_bundle_settings_node__article +features[variable][] = language_content_type_article +features[variable][] = menu_options_article +features[variable][] = menu_parent_article +features[variable][] = node_options_article +features[variable][] = node_preview_article +features[variable][] = node_submitted_article +hidden = 1 diff --git a/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.install b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.install new file mode 100644 index 0000000..a16184c --- /dev/null +++ b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.install @@ -0,0 +1,20 @@ + -10, + 'language-default' => 10, + ); + drupal_static_reset("language_negotiation_info"); + language_negotiation_set(LANGUAGE_TYPE_INTERFACE, $negotiation); + language_negotiation_set(LANGUAGE_TYPE_CONTENT, $negotiation); +} diff --git a/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.module b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.module new file mode 100644 index 0000000..b92bc7b --- /dev/null +++ b/tests/modules/entityreference_entity_translation_test/entityreference_entity_translation_test.module @@ -0,0 +1,7 @@ +disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'comment_anonymous_article'; + $strongarm->value = 0; + $export['comment_anonymous_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'comment_article'; + $strongarm->value = '2'; + $export['comment_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'comment_default_mode_article'; + $strongarm->value = 1; + $export['comment_default_mode_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'comment_default_per_page_article'; + $strongarm->value = '50'; + $export['comment_default_per_page_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'comment_form_location_article'; + $strongarm->value = 1; + $export['comment_form_location_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'comment_preview_article'; + $strongarm->value = '1'; + $export['comment_preview_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'comment_subject_field_article'; + $strongarm->value = 1; + $export['comment_subject_field_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'entity_translation_comment_filter_article'; + $strongarm->value = 0; + $export['entity_translation_comment_filter_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'entity_translation_hide_translation_links_article'; + $strongarm->value = 0; + $export['entity_translation_hide_translation_links_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'entity_translation_node_metadata_article'; + $strongarm->value = '0'; + $export['entity_translation_node_metadata_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'field_bundle_settings_node__article'; + $strongarm->value = array( + 'view_modes' => array( + 'full' => array( + 'custom_settings' => TRUE, + ), + 'teaser' => array( + 'custom_settings' => TRUE, + ), + 'rss' => array( + 'custom_settings' => FALSE, + ), + 'search_index' => array( + 'custom_settings' => FALSE, + ), + 'search_result' => array( + 'custom_settings' => FALSE, + ), + ), + 'extra_fields' => array( + 'form' => array(), + 'display' => array(), + ), + ); + $export['field_bundle_settings_node__article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'language_content_type_article'; + $strongarm->value = '4'; + $export['language_content_type_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'menu_options_article'; + $strongarm->value = array( + 0 => 'main-menu', + ); + $export['menu_options_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'menu_parent_article'; + $strongarm->value = 'main-menu:0'; + $export['menu_parent_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'node_options_article'; + $strongarm->value = array( + 0 => 'status', + 1 => 'promote', + ); + $export['node_options_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'node_preview_article'; + $strongarm->value = '1'; + $export['node_preview_article'] = $strongarm; + + $strongarm = new stdClass(); + $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ + $strongarm->api_version = 1; + $strongarm->name = 'node_submitted_article'; + $strongarm->value = 1; + $export['node_submitted_article'] = $strongarm; + + return $export; +}