<?php
/**
 * @file
 * hw_platform_interaction.features.inc
 */

/**
 * Implements hook_ctools_plugin_api().
 */
function hw_platform_interaction_ctools_plugin_api($module = NULL, $api = NULL) {
  if ($module == "field_group" && $api == "field_group") {
    return array("version" => "1");
  }
}

/**
 * Implements hook_flag_default_flags().
 */
function hw_platform_interaction_flag_default_flags() {
  $flags = array();
  // Exported flag: "Abbrechen".
  $flags['cancel_inserat'] = array(
    'entity_type' => 'node',
    'title' => 'Cancel',
    'global' => 1,
    'types' => array(
      0 => 'inserat',
    ),
    'flag_short' => 'Inserat neu einstellen',
    'flag_long' => '',
    'flag_message' => '',
    'unflag_short' => 'Unflag this item',
    'unflag_long' => '',
    'unflag_message' => 'Inserat neu einstellen',
    'unflag_denied_text' => '',
    'link_type' => 'confirm',
    'weight' => 0,
    'show_in_links' => array(
      'full' => 0,
      'teaser' => 0,
      'rss' => 0,
      'search_index' => 0,
      'search_result' => 0,
      'embed_tools' => 0,
      'print' => 0,
      'token' => 0,
      'revision' => 0,
    ),
    'show_as_field' => 0,
    'show_on_form' => 0,
    'access_author' => 'own',
    'show_contextual_link' => 0,
    'i18n' => 0,
    'flag_confirmation' => 'Inserat neu einstellen',
    'unflag_confirmation' => 'Ihre Inserat ist danach aktiv.',
    'module' => 'hw_platform_interaction',
    'locked' => array(
      0 => 'name',
    ),
    'api_version' => 3,
  );
  // Exported flag: "Merken".
  $flags['merken'] = array(
    'entity_type' => 'node',
    'title' => 'Merken',
    'global' => 0,
    'types' => array(
      0 => 'branche',
      1 => 'inserat',
    ),
    'flag_short' => 'Merken',
    'flag_long' => 'Zu vorgemerkte Inserate hinzufügen',
    'flag_message' => 'Zu vorgemerkte Inserate hinzugefügt',
    'unflag_short' => 'X',
    'unflag_long' => 'Von vorgemerkte Inserate enfernen',
    'unflag_message' => 'Von vorgemerkte Inserate enfernt',
    'unflag_denied_text' => '',
    'link_type' => 'toggle',
    'weight' => 0,
    'show_in_links' => array(
      'full' => 0,
      'teaser' => 0,
      'rss' => 0,
      'search_index' => 0,
      'search_result' => 0,
      'embed_tools' => 0,
      'print' => 0,
      'token' => 0,
      'revision' => 0,
    ),
    'show_as_field' => 1,
    'show_on_form' => 0,
    'access_author' => '',
    'show_contextual_link' => 1,
    'i18n' => 0,
    'module' => 'hw_platform_interaction',
    'locked' => array(
      0 => 'name',
    ),
    'api_version' => 3,
  );
  // Exported flag: "Empfehlung".
  $flags['recommended'] = array(
    'entity_type' => 'profile2',
    'title' => 'Empfehlung',
    'global' => 0,
    'types' => array(
      0 => 'anbieterprofil',
    ),
    'flag_short' => 'Heimwerker weiterempfehlen',
    'flag_long' => '',
    'flag_message' => '',
    'unflag_short' => 'Empfehlung zurückziehen',
    'unflag_long' => '',
    'unflag_message' => '',
    'unflag_denied_text' => 'Sie haben diesen Heimwerker schon empfohlen.',
    'link_type' => 'normal',
    'weight' => 0,
    'show_in_links' => array(
      'account' => 0,
      'page' => 0,
      'teaser' => 0,
      'token' => 0,
    ),
    'show_as_field' => 0,
    'show_on_form' => 0,
    'access_author' => '',
    'show_contextual_link' => 0,
    'module' => 'hw_platform_interaction',
    'locked' => array(
      0 => 'name',
    ),
    'api_version' => 3,
  );
  // Exported flag: "Anbieter melden".
  $flags['report_user'] = array(
    'entity_type' => 'user',
    'title' => 'Anbieter melden',
    'global' => 0,
    'types' => array(),
    'flag_short' => 'Anbieter melden',
    'flag_long' => '',
    'flag_message' => '',
    'unflag_short' => 'Sie haben diesen Anbieter gemeldet',
    'unflag_long' => '',
    'unflag_message' => '',
    'unflag_denied_text' => 'Sie haben diesen Anbieter gemeldet',
    'link_type' => 'confirm',
    'weight' => 0,
    'show_in_links' => array(
      'full' => 0,
      'token' => 0,
      'anbieter_list' => 0,
    ),
    'show_as_field' => 0,
    'show_on_form' => 0,
    'access_author' => '',
    'show_contextual_link' => 0,
    'show_on_profile' => 0,
    'access_uid' => 'others',
    'flag_confirmation' => 'Anbieter melden',
    'unflag_confirmation' => 'Sie haben diesen Anbieter gemeldet',
    'module' => 'hw_platform_interaction',
    'locked' => array(
      0 => 'name',
    ),
    'api_version' => 3,
  );
  return $flags;

}

/**
 * Implements hook_default_invite_type().
 */
function hw_platform_interaction_default_invite_type() {
  $items = array();
  $items['invite_by_email'] = entity_import('invite_type', '{
    "type" : "invite_by_email",
    "label" : "Invite by e-mail",
    "weight" : 0,
    "argument_keys" : [],
    "argument" : [],
    "invite_sending_controller" : { "invite_by_email" : "invite_by_email" },
    "description" : "Invitation by e-mail.",
    "data" : { "invite_by_email" : { "use_default" : 0, "message_editable" : 0, "replace_tokens" : 1 } },
    "rdf_mapping" : []
  }');
  return $items;
}

/**
 * Implements hook_default_profile2_type().
 */
function hw_platform_interaction_default_profile2_type() {
  $items = array();
  $items['anbieterprofil'] = entity_import('profile2_type', '{
    "userCategory" : false,
    "userView" : false,
    "type" : "anbieterprofil",
    "label" : "Anbieterprofil",
    "weight" : "-10",
    "data" : { "registration" : 0, "use_page" : 1 },
    "rdf_mapping" : []
  }');
  $items['benachrichtigungen_anfragen'] = entity_import('profile2_type', '{
    "userCategory" : false,
    "userView" : false,
    "type" : "benachrichtigungen_anfragen",
    "label" : "Mein Konto - Benachrichtigungen",
    "weight" : "0",
    "data" : { "registration" : 0, "use_page" : 1 },
    "rdf_mapping" : []
  }');
  $items['intern'] = entity_import('profile2_type', '{
    "userCategory" : true,
    "userView" : true,
    "type" : "intern",
    "label" : "Intern",
    "weight" : "-10",
    "data" : { "registration" : 0, "use_page" : 0 },
    "rdf_mapping" : []
  }');
  $items['main_profile'] = entity_import('profile2_type', '{
    "userCategory" : true,
    "userView" : true,
    "type" : "main_profile",
    "label" : "Main profile",
    "weight" : "0",
    "data" : { "registration" : 0, "use_page" : 0 },
    "rdf_mapping" : []
  }');
  $items['notifications'] = entity_import('profile2_type', '{
    "userCategory" : false,
    "userView" : false,
    "type" : "notifications",
    "label" : "Benachrichtigungen",
    "weight" : "0",
    "data" : { "registration" : 0, "use_page" : 1 },
    "rdf_mapping" : []
  }');
  return $items;
}
