You are here

function oa_comment_field_default_field_instances_template in OA Comment 7.2

Template callback for field_topic.

Used as a template for other bundles. References to oa_wiki_page will be replaced by features_template.

1 string reference to 'oa_comment_field_default_field_instances_template'
oa_comment_features_template_info in ./oa_comment.module
Implements hook_features_template_info().

File

./oa_comment.module, line 297

Code

function oa_comment_field_default_field_instances_template() {
  $field_instances = array();
  foreach (paragraphs_bundle_load() as $machine_name => $bundle) {
    $bundles[$machine_name] = $machine_name;
  }

  // Exported field_instance:
  // 'comment-comment_node_oa_discussion_post-field_oa_related'
  $field_instances['comment-comment_node_oa_discussion_post-field_oa_related'] = array(
    'bundle' => 'comment_node_oa_discussion_post',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => 'paragraphs',
        'settings' => array(
          'view_mode' => 'full',
        ),
        'type' => 'paragraphs_view',
        'weight' => 1,
      ),
    ),
    'entity_type' => 'comment',
    'field_name' => 'field_oa_related',
    'label' => 'Paragraphs',
    'required' => 0,
    'settings' => array(
      'add_mode' => 'button',
      'add_mode_instructions' => '',
      'allowed_bundles' => array_intersect_key($bundles, array_filter(variable_get('comment_paragraph_bundles', $bundles))),
      'default_edit_mode' => 'open',
      'hide_instructions' => 1,
      'title' => 'Paragraph',
      'title_multiple' => 'Paragraphs',
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 0,
      'module' => 'paragraphs',
      'settings' => array(),
      'type' => 'paragraphs_embed',
      'weight' => 2,
    ),
  );
  return $field_instances;
}