You are here

function civicrm_entity_supported_entities_info in CiviCRM Entity 7.2

Whitelist of total CiviCRM Entity related info metadata

Return value

array

1 call to civicrm_entity_supported_entities_info()
civicrm_entity_get_supported_entity_info in ./civicrm_entity.module
Get supported CiviCRM entity information

File

./civicrm_entity.module, line 526

Code

function civicrm_entity_supported_entities_info() {
  $civicrm_entity_info = array();
  $civicrm_entity_info['civicrm_activity'] = array(
    'civicrm entity name' => 'activity',
    'label property' => 'subject',
    'permissions' => array(
      'view' => array(
        'view all activities',
      ),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(
        'delete activities',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-activity',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'source_contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'assignee_contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'target_contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'relationship_id',
          'target' => 'civicrm_relationship',
        ),
        array(
          'link_field' => 'parent_id',
          'target' => 'civicrm_activity',
        ),
        array(
          'link_field' => 'original_id',
          'target' => 'civicrm_activity',
        ),
      ),
      'option fields' => array(
        'activity_type_id',
        'status_id',
        'medium_id',
        'priority_id',
        'engagement_level',
      ),
      'boolean fields' => array(
        'is_auto',
        'is_current_revision',
        'is_test',
        'is_deleted',
      ),
      'date fields' => array(
        'activity_date_time',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_action_schedule'] = array(
    'civicrm entity name' => 'action_schedule',
    'label property' => 'name',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'display suite' => array(
      'date fields' => array(
        'absolute_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_address'] = array(
    'civicrm entity name' => 'address',
    'label property' => 'name',
    'permissions' => array(
      'view' => array(
        'view all contacts',
      ),
      'edit' => array(
        'edit all contacts',
      ),
      'update' => array(
        'edit all contacts',
      ),
      'create' => array(
        'edit all contacts',
      ),
      'delete' => array(
        'delete contacts',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-address',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'contact_id_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'master_id',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'location_type_id',
        'county_id',
        'state_province_id',
        'country_id',
      ),
      'boolean fields' => array(
        'is_primary',
        'is_billing',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_campaign'] = array(
    'civicrm entity name' => 'campaign',
    'label property' => 'title',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-campaign',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'date fields' => array(
        'start_date',
        'end_date',
        'created_date',
        'last_modified_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_case'] = array(
    'civicrm entity name' => 'case',
    'label property' => 'subject',
    'permissions' => array(
      'view' => array(
        'access all cases and activities',
      ),
      'edit' => array(
        'access all cases and activities',
      ),
      'update' => array(
        'access all cases and activities',
      ),
      'create' => array(
        'add cases',
        'access all cases and activities',
      ),
      'delete' => array(
        'delete in CiviCase',
        'access all cases and activities',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-case',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'option fields' => array(
        'case_type_id',
        'status_id',
      ),
      'boolean fields' => array(
        'is_deleted',
      ),
      'date fields' => array(
        'start_date',
        'end_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_contact'] = array(
    'civicrm entity name' => 'contact',
    'label property' => 'display_name',
    'permissions' => array(
      'view' => array(
        'view all contacts',
      ),
      'edit' => array(
        'edit all contacts',
      ),
      'update' => array(
        'edit all contacts',
      ),
      'create' => array(
        'edit all contacts',
      ),
      'delete' => array(
        'delete contacts',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-contact',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'employer_id_contact',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'preferred_communication_method',
        'prefix_id',
        'suffix_id',
        'communication_style_id',
        'gender_id',
        'country_id',
        'state_province_id',
      ),
      'boolean fields' => array(
        'is_deceased',
        'do_not_email',
        'do_not_phone',
        'do_not_sms',
        'do_not_trade',
        'do_not_mail',
        'is_opt_out',
        'is_deleted',
        'contact_is_deleted',
      ),
      'date fields' => array(
        'birth_date',
        'deceased_date',
      ),
      'timestamp fields' => array(
        'created_date',
        'modified_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_contribution'] = array(
    'civicrm entity name' => 'contribution',
    'label property' => 'source',
    'permissions' => array(
      'view' => array(
        'access CiviContribute',
        'administer CiviCRM',
      ),
      'edit' => array(
        'edit contributions',
        'administer CiviCRM',
      ),
      'update' => array(
        'edit contributions',
        'administer CiviCRM',
      ),
      'create' => array(
        'edit contributions',
        'administer CiviCRM',
      ),
      'delete' => array(
        'edit contributions',
        'delete in CiviContribute',
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-contribution',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'payment_processor',
          'target' => 'civicrm_payment_processor',
        ),
        array(
          'link_field' => 'id',
          'target' => 'civicrm_contribution',
        ),
      ),
      'option fields' => array(
        'financial_type_id',
        'contribution_status_id',
        'payment_instrument_id',
      ),
      'boolean fields' => array(
        'is_test',
        'is_pay_later',
      ),
      'date fields' => array(
        'cancel_date',
        'receipt_date',
        'thankyou_date',
        'receive_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_contribution_recur'] = array(
    'civicrm entity name' => 'contribution_recur',
    'label property' => 'id',
    'permissions' => array(
      'view' => array(
        'access CiviContribute',
        'administer CiviCRM',
      ),
      'edit' => array(
        'edit contributions',
        'administer CiviCRM',
      ),
      'update' => array(
        'edit contributions',
        'administer CiviCRM',
      ),
      'create' => array(
        'edit contributions',
        'administer CiviCRM',
      ),
      'delete' => array(
        'edit contributions',
        'delete in CiviContribute',
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-contribution-recur',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'payment_processor_id',
          'target' => 'civicrm_payment_processor',
        ),
        array(
          'link_field' => 'financial_type_id',
          'target' => 'civicrm_contribution',
        ),
        array(
          'link_field' => 'campaign_id',
          'target' => 'civicrm_campaign',
        ),
      ),
      'option fields' => array(
        'financial_type_id',
        'contribution_status_id',
        'payment_instrument_id',
      ),
      'boolean fields' => array(
        'is_test',
        'is_email_receipt',
        'auto_renew',
      ),
      'date fields' => array(
        'create_date',
        'modified_date',
        'cancel_date',
        'end_date',
        'failure_retry_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_contribution_page'] = array(
    'civicrm entity name' => 'contribution_page',
    'label property' => 'title',
    'permissions' => array(
      'view' => array(
        'make online contributions',
      ),
      'edit' => array(
        'access CiviContribute',
        'administer CiviCRM',
      ),
      'update' => array(
        'access CiviContribute',
        'administer CiviCRM',
      ),
      'create' => array(
        'access CiviContribute',
        'administer CiviCRM',
      ),
      'delete' => array(
        'access CiviContribute',
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-contribution-page',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'created_id_contact',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'financial_type_id',
        'currency',
      ),
      'boolean fields' => array(
        'is_credit_card_only',
        'is_monetary',
        'is_recur',
        'is_confirm_enabled',
        'is_recur_interval',
        'is_recur_installments',
        'is_pay_later',
        'is_partial_payment',
        'is_allow_other_amount',
        'is_for_organization',
        'is_email_receipt',
        'is_active',
        'is_share',
        'is_billing_required',
      ),
      'date fields' => array(
        'start_date',
        'end_date',
        'created_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_country'] = array(
    'civicrm entity name' => 'country',
    'label property' => 'name',
    'permissions' => array(
      'view' => array(
        'view all contacts',
      ),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-country',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'boolean fields' => array(
        'is_province_abbreviated',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_email'] = array(
    'civicrm entity name' => 'email',
    'label property' => 'email',
    'permissions' => array(
      'view' => array(
        'view all contacts',
      ),
      'edit' => array(
        'edit all contacts',
      ),
      'update' => array(
        'edit all contacts',
      ),
      'create' => array(
        'edit all contacts',
      ),
      'delete' => array(
        'delete contacts',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-email',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'contact_id_contact',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'location_type_id',
      ),
      'boolean fields' => array(
        'is_primary',
        'is_billing',
        'on_hold',
        'is_bulkmail',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_entity_tag'] = array(
    'civicrm entity name' => 'entity_tag',
    'label property' => 'tag_id',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-entity-tag',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'tag_id',
          'target' => 'civicrm_tag',
        ),
      ),
    ),
  );
  $civicrm_entity_info['civicrm_entity_financial_trxn'] = array(
    'civicrm entity name' => 'entity_financial_trxn',
    'label property' => 'id',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-entity-financial-trxn',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'financial_trxn_id',
          'target' => 'civicrm_financial_trxn',
        ),
      ),
    ),
  );
  $civicrm_entity_info['civicrm_financial_account'] = array(
    'civicrm entity name' => 'financial_account',
    'label property' => 'name',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-financial-account',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'option fields' => array(
        'financial_account_type_id',
      ),
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'parent_id',
          'target' => 'civicrm_financial_account',
        ),
      ),
      'date fields' => array(
        'trxn_date',
      ),
      'boolean fields' => array(
        'is_header_account',
        'is_deductible',
        'is_tax',
        'is_reserved',
        'is_active',
        'is_default',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_financial_trxn'] = array(
    'civicrm entity name' => 'financial_trxn',
    'label property' => 'id',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-financial-trxn',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'option fields' => array(
        'status_id',
      ),
      'link fields' => array(
        array(
          'link_field' => 'payment_processor_id',
          'target' => 'civicrm_payment_processor',
        ),
      ),
      'date fields' => array(
        'trxn_date',
      ),
    ),
  );

  //dirty check for whether financialType exists
  if (!method_exists('CRM_Contribute_PseudoConstant', 'contributionType')) {
    $civicrm_entity_info['civicrm_financial_type'] = array(
      'civicrm entity name' => 'financial_type',
      'label property' => 'description',
      'permissions' => array(
        'view' => array(
          'access CiviContribute',
          'administer CiviCRM',
        ),
        'edit' => array(
          'access CiviContribute',
          'administer CiviCRM',
        ),
        'update' => array(
          'access CiviContribute',
          'administer CiviCRM',
        ),
        'create' => array(
          'access CiviContribute',
          'administer CiviCRM',
        ),
        'delete' => array(
          'delete in CiviContribute',
          'administer CiviCRM',
        ),
      ),
      'theme' => array(
        'template' => 'civicrm-financial-type',
        'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
      ),
      'display suite' => array(
        'boolean fields' => array(
          'is_reserved',
          'is_active',
          'is_deductible',
        ),
      ),
    );
  }
  $civicrm_entity_info['civicrm_event'] = array(
    'civicrm entity name' => 'event',
    'label property' => 'title',
    'permissions' => array(
      'view' => array(
        'view event info',
      ),
      'edit' => array(
        'edit all events',
      ),
      'update' => array(
        'edit all events',
      ),
      'create' => array(
        'edit all events',
      ),
      'delete' => array(
        'edit all events',
        'delete in CiviEvent',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-event',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'created_id_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'created_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'parent_event_id',
          'target' => 'civicrm_event',
        ),
      ),
      'option fields' => array(
        'event_type_id',
        'financial_type_id',
        'default_role_id',
      ),
      'boolean fields' => array(
        'is_public',
        'is_pay_later',
        'is_online_registration',
        'is_monetary',
        'is_map',
        'is_active',
        'is_show_location',
        'is_partial_payment',
        'is_multiple_registrations',
        'allow_same_participant_emails',
        'has_waitlist',
        'requires_approval',
        'is_template',
        'is_share',
        'is_confirm_enabled',
      ),
      'date fields' => array(
        'start_date',
        'end_date',
        'registration_start_date',
        'registration_end_date',
        'created_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_group'] = array(
    'civicrm entity name' => 'group',
    'label property' => 'name',
    'permissions' => array(
      'view' => array(
        'edit groups',
      ),
      'edit' => array(
        'edit groups',
      ),
      'update' => array(
        'edit groups',
      ),
      'create' => array(
        'edit groups',
      ),
      'delete' => array(
        'edit groups',
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-group',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'created_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'created_id_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'modified_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'modified_id_contact',
          'target' => 'civicrm_contact',
        ),
      ),
      'boolean fields' => array(
        'is_active',
        'is_hidden',
        'is_reserved',
      ),
      'timestamp fields' => array(
        'cached_date',
        'refresh_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_grant'] = array(
    'civicrm entity name' => 'grant',
    'label property' => '',
    'permissions' => array(
      'view' => array(
        'access CiviGrant',
        'administer CiviCRM',
      ),
      'edit' => array(
        'access CiviGrant',
        'edit grants',
      ),
      'update' => array(
        'access CiviGrant',
        'edit grants',
      ),
      'create' => array(
        'access CiviGrant',
        'edit grants',
      ),
      'delete' => array(
        'access CiviGrant',
        'edit grants',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-grant',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'contact_id_contact',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'status_id',
        'financial_type_id',
        'grant_type_id',
      ),
      'boolean fields' => array(
        'grant_report_received',
      ),
      'date fields' => array(
        'application_received_date',
        'decision_date',
        'money_transfer_date',
        'grant_due_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_im'] = array(
    'civicrm entity name' => 'im',
    'label property' => 'name',
    'permissions' => array(
      'view' => array(
        'view all contacts',
      ),
      'edit' => array(
        'edit all contacts',
      ),
      'update' => array(
        'edit all contacts',
      ),
      'create' => array(
        'edit all contacts',
      ),
      'delete' => array(
        'delete contacts',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-im',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'location_type_id',
        'provider_id',
      ),
      'boolean fields' => array(
        'is_primary',
        'is_billing',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_line_item'] = array(
    'civicrm entity name' => 'line_item',
    'label property' => 'label',
    'permissions' => array(
      'view' => array(
        'administer CiviCRM',
      ),
      'edit' => array(
        'administer CiviCRM',
      ),
      'update' => array(
        'administer CiviCRM',
      ),
      'create' => array(
        'administer CiviCRM',
      ),
      'delete' => array(
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-line-item',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contribution_id',
          'target' => 'civicrm_contribution',
        ),
        array(
          'link_field' => 'price_field_id',
          'target' => 'civicrm_price_field',
        ),
        array(
          'link_field' => 'price_field_value_id',
          'target' => 'civicrm_price_field_value',
        ),
        array(
          'link_field' => 'financial_type_id',
          'target' => 'civicrm_financial_type',
        ),
      ),
    ),
  );
  $civicrm_entity_info['civicrm_loc_block'] = array(
    'civicrm entity name' => 'loc_block',
    'label property' => '',
    'permissions' => array(
      'view' => array(
        'administer CiviCRM',
      ),
      'edit' => array(
        'administer CiviCRM',
      ),
      'update' => array(
        'administer CiviCRM',
      ),
      'create' => array(
        'administer CiviCRM',
      ),
      'delete' => array(
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-loc-block',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'address_id',
          'target' => 'civicrm_address',
        ),
        array(
          'link_field' => 'email_id',
          'target' => 'civicrm_email',
        ),
        array(
          'link_field' => 'phone_id',
          'target' => 'civicrm_phone',
        ),
        array(
          'link_field' => 'im_id',
          'target' => 'civicrm_im',
        ),
        array(
          'link_field' => 'address_2_id',
          'target' => 'civicrm_address',
        ),
        array(
          'link_field' => 'phone_2_id',
          'target' => 'civicrm_phone',
        ),
        array(
          'link_field' => 'email_2_id',
          'target' => 'civicrm_email',
        ),
        array(
          'link_field' => 'im_2_id',
          'target' => 'civicrm_im',
        ),
      ),
      'option fields' => array(),
      'boolean fields' => array(),
    ),
  );
  $civicrm_entity_info['civicrm_membership'] = array(
    'civicrm entity name' => 'membership',
    'permissions' => array(
      'view' => array(
        'access CiviMember',
      ),
      'edit' => array(
        'edit memberships',
        'access CiviMember',
      ),
      'update' => array(
        'edit memberships',
        'access CiviMember',
      ),
      'create' => array(
        'edit memberships',
        'access CiviMember',
      ),
      'delete' => array(
        'delete in CiviMember',
        'access CiviMember',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-membership',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'contact_id_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'owner_membership_id',
          'target' => 'civicrm_membership',
        ),
        array(
          'link_field' => 'id',
          'target' => 'civicrm_membership',
        ),
      ),
      'option fields' => array(
        'membership_type_id',
        'status_id',
      ),
      'boolean fields' => array(
        'is_test',
        'is_pay_later',
        'is_override',
      ),
      'date fields' => array(
        'start_date',
        'end_date',
        'join_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_membership_payment'] = array(
    'civicrm entity name' => 'membership_payment',
    'permissions' => array(
      'view' => array(
        'access CiviMember',
        'access CiviContribute',
      ),
      'edit' => array(
        'access CiviMember',
        'access CiviContribute',
      ),
      'update' => array(
        'access CiviMember',
        'access CiviContribute',
      ),
      'create' => array(
        'access CiviMember',
        'access CiviContribute',
      ),
      'delete' => array(
        'delete in CiviMember',
        'access CiviMember',
        'access CiviContribute',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-membership-payment',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contribution_id',
          'target' => 'civicrm_contribution',
        ),
        array(
          'link_field' => 'membership_id',
          'target' => 'civicrm_membership',
        ),
      ),
      'option fields' => array(),
      'boolean fields' => array(),
    ),
  );
  $civicrm_entity_info['civicrm_membership_type'] = array(
    'civicrm entity name' => 'membership_type',
    'label property' => 'name',
    'permissions' => array(
      'view' => array(
        'access CiviMember',
      ),
      'edit' => array(
        'access CiviMember',
        'administer CiviCRM',
      ),
      'update' => array(
        'access CiviMember',
        'administer CiviCRM',
      ),
      'create' => array(
        'access CiviMember',
        'administer CiviCRM',
      ),
      'delete' => array(
        'delete in CiviMember',
        'access CiviMember',
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-membership-type',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'member_of_contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'member_of_contact_id_contact',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'financial_type_id',
      ),
      'boolean fields' => array(
        'is_active',
        'auto_renew',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_note'] = array(
    'civicrm entity name' => 'note',
    'label property' => 'subject',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-note',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
      ),
      'date fields' => array(
        'modified_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_participant'] = array(
    'civicrm entity name' => 'participant',
    'label property' => 'source',
    'permissions' => array(
      'view' => array(
        'view event participants',
      ),
      'edit' => array(
        'edit event participants',
        'access CiviEvent',
      ),
      'update' => array(
        'edit event participants',
        'access CiviEvent',
      ),
      'create' => array(
        'edit event participants',
        'access CiviEvent',
      ),
      'delete' => array(
        'edit event participants',
        'access CiviEvent',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-participant',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'contact_id_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'event_id',
          'target' => 'civicrm_event',
        ),
        array(
          'link_field' => 'event_id_event',
          'target' => 'civicrm_event',
        ),
        array(
          'link_field' => 'registered_by_id',
          'target' => 'civicrm_participant',
        ),
      ),
      'option fields' => array(
        'status_id',
        'role_id',
      ),
      'boolean fields' => array(
        'is_test',
        'is_pay_later',
        'must_wait',
      ),
      'date fields' => array(
        'register_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_participant_status_type'] = array(
    'civicrm entity name' => 'participant_status_type',
    'label property' => 'label',
    'permissions' => array(
      'view' => array(
        'view event participants',
      ),
      'edit' => array(
        'edit event participants',
        'access CiviEvent',
      ),
      'update' => array(
        'edit event participants',
        'access CiviEvent',
      ),
      'create' => array(
        'edit event participants',
        'access CiviEvent',
      ),
      'delete' => array(
        'edit event participants',
        'access CiviEvent',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-participant-status-type',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(),
      'option fields' => array(
        'visibility_id',
      ),
      'boolean fields' => array(
        'is_reserved',
        'is_active',
        'is_counted',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_participant_payment'] = array(
    'civicrm entity name' => 'participant_payment',
    'label property' => 'id',
    'permissions' => array(
      'view' => array(
        'administer CiviCRM',
      ),
      'edit' => array(
        'administer CiviCRM',
      ),
      'update' => array(
        'administer CiviCRM',
      ),
      'create' => array(
        'administer CiviCRM',
      ),
      'delete' => array(
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-participant-payment',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'participant_id',
          'target' => 'civicrm_participant',
        ),
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
      ),
    ),
  );
  $civicrm_entity_info['civicrm_payment_processor'] = array(
    'civicrm entity name' => 'payment_processor',
    'label property' => 'name',
    'permissions' => array(
      'view' => array(
        'administer CiviCRM',
      ),
      'edit' => array(
        'administer CiviCRM',
      ),
      'update' => array(
        'administer CiviCRM',
      ),
      'create' => array(
        'administer CiviCRM',
      ),
      'delete' => array(
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-payment-processor',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'payment_processor_type_id',
          'target' => 'civicrm_payment_processor_type',
        ),
      ),
      'option fields' => array(),
      'boolean fields' => array(
        'is_active',
        'is_default',
        'is_test',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_payment_processor_type'] = array(
    'civicrm entity name' => 'payment_processor_type',
    'label property' => 'title',
    'permissions' => array(
      'view' => array(
        'administer CiviCRM',
      ),
      'edit' => array(
        'administer CiviCRM',
      ),
      'update' => array(
        'administer CiviCRM',
      ),
      'create' => array(
        'administer CiviCRM',
      ),
      'delete' => array(
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-payment-processor-type',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(),
      'option fields' => array(),
      'boolean fields' => array(
        'is_active',
        'is_default',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_phone'] = array(
    'civicrm entity name' => 'phone',
    'label property' => 'phone',
    'permissions' => array(
      'view' => array(
        'view all contacts',
      ),
      'edit' => array(
        'edit all contacts',
      ),
      'update' => array(
        'edit all contacts',
      ),
      'create' => array(
        'edit all contacts',
      ),
      'delete' => array(
        'delete contacts',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-phone',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'location_type_id',
        'mobile_provider_id',
        'phone_type_id',
      ),
      'boolean fields' => array(
        'is_primary',
        'is_billing',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_pledge'] = array(
    'civicrm entity name' => 'pledge',
    'permissions' => array(
      'view' => array(
        'access CiviPledge',
      ),
      'edit' => array(
        'edit pledges',
      ),
      'update' => array(
        'edit pledges',
      ),
      'create' => array(
        'edit pledges',
      ),
      'delete' => array(
        'edit pledges',
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-pledge',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'date fields' => array(
        'start_date',
        'end_date',
        'cancel_date',
        'modified_date',
        'created_date',
        'acknowledge_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_pledge_payment'] = array(
    'civicrm entity name' => 'pledge_payment',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-pledge-payment',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'date fields' => array(
        'scheduled_date',
        'reminder_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_price_set'] = array(
    'civicrm entity name' => 'price_set',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-price-set',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'boolean fields' => array(
        'is_active',
        'is_quick_config',
        'is_reserved',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_price_field'] = array(
    'civicrm entity name' => 'price_field',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-price-field',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'price_set_id',
          'target' => 'civicrm_price_set',
        ),
      ),
      'option fields' => array(
        'visibility_id',
      ),
      'boolean fields' => array(
        'is_enter_qty',
        'is_display_amounts',
        'is_active',
        'is_required',
      ),
      'date fields' => array(
        'active_on',
        'expire_on',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_price_field_value'] = array(
    'civicrm entity name' => 'price_field_value',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-price-field-value',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'price_field_id',
          'target' => 'civicrm_price_field',
        ),
        array(
          'link_field' => 'membership_type_id',
          'target' => 'civicrm_membership_type',
        ),
      ),
      'option fields' => array(
        'financial_type_id',
      ),
      'boolean fields' => array(
        'is_default',
        'is_active',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_recurring_entity'] = array(
    'civicrm entity name' => 'recurring_entity',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-recurring-entity',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(),
      'option fields' => array(),
      'boolean fields' => array(),
    ),
  );
  $civicrm_entity_info['civicrm_relationship'] = array(
    'civicrm entity name' => 'relationship',
    'label property' => 'description',
    'permissions' => array(
      'view' => array(
        'view all contacts',
      ),
      'edit' => array(
        'edit all contacts',
      ),
      'update' => array(
        'edit all contacts',
      ),
      'create' => array(
        'edit all contacts',
      ),
      'delete' => array(
        'edit all contacts',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-relationship',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id_a',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'contact_id_a_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'contact_id_b',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'contact_id_b_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'relationship_type_id',
          'target' => 'civicrm_relationship_type',
        ),
      ),
      'boolean fields' => array(
        'is_active',
        'is_permission_a_b',
        'is_permission_b_a',
      ),
      'date fields' => array(
        'start_date',
        'end_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_relationship_type'] = array(
    'civicrm entity name' => 'relationship_type',
    'label property' => 'description',
    'permissions' => array(
      'view' => array(
        'administer CiviCRM',
      ),
      'edit' => array(
        'administer CiviCRM',
      ),
      'update' => array(
        'administer CiviCRM',
      ),
      'create' => array(
        'administer CiviCRM',
      ),
      'delete' => array(
        'administer CiviCRM',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-relationship-type',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'option fields' => array(
        'contact_sub_type_a',
        'contact_sub_type_b',
      ),
      'boolean fields' => array(
        'is_reserved',
        'is_active',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_survey'] = array(
    'civicrm entity name' => 'survey',
    'label property' => 'title',
    'permissions' => array(
      'view' => array(
        'administer CiviCampaign',
      ),
      'edit' => array(
        'administer CiviCampaign',
      ),
      'update' => array(
        'administer CiviCampaign',
      ),
      'create' => array(
        'administer CiviCampaign',
      ),
      'delete' => array(
        'administer CiviCampaign',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-survey',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'campaign_id',
          'target' => 'civicrm_campaign',
        ),
        array(
          'link_field' => 'created_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'last_modified_id',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'activity_type_id',
      ),
      'boolean fields' => array(
        'is_active',
        'is_default',
        'bypass_confirm',
        'is_share',
      ),
      'date fields' => array(
        'created_date',
        'last_modified_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_tag'] = array(
    'civicrm entity name' => 'tag',
    'label property' => 'name',
    'permissions' => array(
      'view' => array(
        'administer Tagsets',
      ),
      'edit' => array(
        'administer Tagsets',
      ),
      'update' => array(
        'administer Tagsets',
      ),
      'create' => array(
        'administer Tagsets',
      ),
      'delete' => array(
        'administer Tagsets',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-tag',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'created_id',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'created_id_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'parent_id',
          'target' => 'civicrm_tag',
        ),
      ),
      'boolean fields' => array(
        'is_reserved',
        'is_tagset',
        'is_selectable',
      ),
      'date fields' => array(
        'created_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_custom_field'] = array(
    'civicrm entity name' => 'custom_field',
    'label property' => 'label',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-custom-field',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'custom_group_id',
          'target' => 'civicrm_custom_group',
        ),
      ),
      'boolean fields' => array(
        'is_view',
        'is_active',
        'is_required',
        'is_searchable',
        'is_search_range',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_custom_group'] = array(
    'civicrm entity name' => 'custom_group',
    'label property' => 'title',
    'permissions' => array(
      'view' => array(),
      'edit' => array(),
      'update' => array(),
      'create' => array(),
      'delete' => array(),
    ),
    'theme' => array(
      'template' => 'civicrm-custom-group',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'created_id_contact',
          'target' => 'civicrm_contact',
        ),
        array(
          'link_field' => 'membership_type_id',
          'target' => 'civicrm_membership_type',
        ),
      ),
      'boolean fields' => array(
        'is_multiple',
        'is_active',
        'collapse_display',
        'collapse_adv_display',
        'is_reserved',
      ),
      'date fields' => array(
        'created_date',
      ),
    ),
  );
  $civicrm_entity_info['civicrm_website'] = array(
    'civicrm entity name' => 'website',
    'label property' => 'url',
    'permissions' => array(
      'view' => array(
        'view all contacts',
      ),
      'edit' => array(
        'edit all contacts',
      ),
      'update' => array(
        'edit all contacts',
      ),
      'create' => array(
        'edit all contacts',
      ),
      'delete' => array(
        'delete contacts',
      ),
    ),
    'theme' => array(
      'template' => 'civicrm-website',
      'path' => drupal_get_path('module', 'civicrm_entity') . '/templates',
    ),
    'display suite' => array(
      'link fields' => array(
        array(
          'link_field' => 'contact_id',
          'target' => 'civicrm_contact',
        ),
      ),
      'option fields' => array(
        'website_type_id',
      ),
    ),
  );
  return $civicrm_entity_info;
}