function party_starterkit_b2b_install_instances in Party 7
Same name and namespace in other branches
- 8.2 starterkits/party_starterkit_b2b/party_starterkit_b2b.install \party_starterkit_b2b_install_instances()
Implements hook_install_instances().
File
- starterkits/
party_starterkit_b2b/ party_starterkit_b2b.install, line 172 - Party Starterkit B2B install file
Code
function party_starterkit_b2b_install_instances() {
$t = get_t();
$instances = array();
$instances['party_org_name'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_org',
'field_name' => 'party_org_name',
'label' => $t('Name'),
'description' => $t('The name of this organization.'),
'widget' => array(
'type' => 'text_textfield',
),
);
$instances['party_org_web'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_org',
'field_name' => 'party_org_web',
'label' => $t('Website'),
'description' => $t("The organization's website."),
'settings' => array(
'title' => 'none',
),
'widget' => array(
'type' => 'link_field',
),
);
$instances['party_org_email'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_org',
'field_name' => 'party_org_email',
'label' => $t('Email'),
'description' => $t("The organization's email address."),
'widget' => array(
'type' => 'email_textfield',
),
);
$instances['party_org_address'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_org',
'field_name' => 'party_org_address',
'label' => $t('Address'),
'description' => $t("The organization's address."),
'widget' => array(
'type' => 'addressfield_standard',
'settings' => array(
'format_handlers' => array(
'address_hide_country' => 'address_hide_country',
),
),
),
);
$instances['party_org_phone'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_org',
'field_name' => 'party_org_phone',
'label' => $t('Phone Number'),
'settings' => array(
'ca_phone_parentheses' => 0,
),
'widget' => array(
'type' => 'phone_textfield',
),
);
$instances['party_org_type'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_org',
'field_name' => 'party_org_type',
'label' => $t('Organization Type'),
'widget' => array(
'type' => 'options_select',
),
);
$instances['party_contact_name'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_contact',
'field_name' => 'party_contact_name',
'label' => $t('Name'),
'description' => $t('The name of this contact.'),
'widget' => array(
'type' => 'name_widget',
),
);
$instances['party_contact_email'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_contact',
'field_name' => 'party_contact_email',
'label' => $t('Email'),
'description' => $t("The contact's email address."),
'widget' => array(
'type' => 'email_textfield',
),
);
$instances['party_contact_address'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_contact',
'field_name' => 'party_contact_address',
'label' => $t('Address'),
'description' => $t("The contact's address."),
'widget' => array(
'type' => 'addressfield_standard',
'settings' => array(
'format_handlers' => array(
'address_hide_country' => 'address_hide_country',
),
),
),
);
$instances['party_contact_phone'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_contact',
'field_name' => 'party_contact_phone',
'label' => $t('Phone Number'),
'settings' => array(
'ca_phone_parentheses' => 0,
),
'widget' => array(
'type' => 'phone_textfield',
),
);
$instances['party_notes_notes'] = array(
'entity_type' => 'profile2',
'bundle' => 'party_notes',
'field_name' => 'party_notes_notes',
'label' => $t('Notes'),
'settings' => array(
'text_processing' => 0,
),
'widget' => array(
'type' => 'text_textarea',
'settings' => array(
'rows' => 5,
),
),
);
return $instances;
}