You are here

function uuid_features_features_api in UUID Features Integration 7

Same name and namespace in other branches
  1. 6 uuid_features.module \uuid_features_features_api()

Implements hook_features_api().

File

./uuid_features.module, line 83
UUID Features module allows to export data stored in the db by features.

Code

function uuid_features_features_api() {
  $components = array();
  $components['uuid_node'] = array(
    'name' => t('Content'),
    'feature_source' => TRUE,
    'default_hook' => 'uuid_features_default_content',
    'default_file' => FEATURES_DEFAULTS_INCLUDED,
    'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_node.features.inc',
  );
  $components['uuid_user'] = array(
    'name' => t('Users'),
    'feature_source' => TRUE,
    'default_hook' => 'uuid_features_default_users',
    'default_file' => FEATURES_DEFAULTS_INCLUDED,
    'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_user.features.inc',
  );
  if (module_exists('taxonomy')) {
    $components['uuid_term'] = array(
      'name' => t('Taxonomy Term'),
      'feature_source' => TRUE,
      'default_hook' => 'uuid_features_default_terms',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_term.features.inc',
    );
  }
  if (module_exists('book')) {
    $components['uuid_book'] = array(
      'name' => t('Book'),
      'default_hook' => 'uuid_features_default_book',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_book.features.inc',
    );
  }
  if (function_exists('uuid_file_insert')) {
    $components['uuid_file'] = array(
      'name' => t('File'),
      'default_hook' => 'uuid_features_default_files',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_file.features.inc',
    );
  }
  if (module_exists('file_entity')) {
    $components['uuid_file_entity'] = array(
      'name' => t('File Entity'),
      'default_hook' => 'uuid_features_default_file_entities',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_file_entity.features.inc',
    );
  }
  if (module_exists('bean')) {
    $components['uuid_bean'] = array(
      'name' => t('Bean'),
      'feature_source' => TRUE,
      'default_hook' => 'uuid_features_default_beans',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_bean.features.inc',
    );
  }
  if (module_exists('field_collection')) {
    $components['uuid_field_collection'] = array(
      'name' => t('Field collection'),
      'feature_source' => TRUE,
      'default_hook' => 'uuid_features_default_field_collections',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_field_collection.features.inc',
    );
  }
  if (module_exists('nodequeue')) {
    $components['uuid_nodequeue_item'] = array(
      'name' => t('Nodequeue item'),
      'feature_source' => TRUE,
      'default_hook' => 'uuid_features_default_nodequeue_items',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_nodequeue_item.features.inc',
    );
  }
  if (module_exists('current_search')) {
    $components['uuid_current_search_configuration'] = array(
      'name' => t('Current search block configuration'),
      'feature_source' => TRUE,
      'default_hook' => 'uuid_features_default_current_search_configurations',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_current_search_configuration.features.inc',
    );
  }
  if (module_exists('fieldable_panels_panes')) {
    $components['uuid_fpp'] = array(
      'name' => t('Fieldable Panels Panes Content'),
      'feature_source' => TRUE,
      'default_hook' => 'uuid_features_default_fpps',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_fpp.features.inc',
    );
  }
  if (module_exists('panelizer')) {

    // Only enable panelizer support if the current version of the module uses
    // a schema we are compatible with. Ie. Panelizer 7.x-3.x or later.
    $panelizer_schema_info = drupal_get_schema('panelizer_entity');
    if (!empty($panelizer_schema_info['fields']['view_mode'])) {
      $components['uuid_panelizer'] = array(
        'name' => t('Panelizer Entity Displays'),
        'feature_source' => TRUE,
        'default_hook' => 'uuid_features_default_panelizer',
        'default_file' => FEATURES_DEFAULTS_INCLUDED,
        'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_panelizer.features.inc',
      );
    }
  }
  if (module_exists('commerce_uuid')) {
    if (module_exists('commerce_product')) {
      $components['uuid_commerce_product'] = array(
        'name' => t('Commerce Product'),
        'feature_source' => TRUE,
        'default_hook' => 'uuid_features_default_commerce_product',
        'default_file' => FEATURES_DEFAULTS_INCLUDED,
        'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_commerce_product.features.inc',
      );
    }
  }
  if (module_exists('paragraphs')) {
    $components['uuid_paragraphs'] = array(
      'name' => t('Paragraphs'),
      'feature_source' => TRUE,
      'default_hook' => 'uuid_features_default_paragraphs',
      'default_file' => FEATURES_DEFAULTS_INCLUDED,
      'file' => drupal_get_path('module', 'uuid_features') . '/includes/uuid_paragraphs.features.inc',
    );
  }
  return $components;
}