function eck__remove_extra_field_form in Entity Construction Kit (ECK) 7.3
Form for removing the property from an entity's list of extra fields.
Parameters
array $form: The property widget form
array $form_state: The current state of the form
string $entity_type: The machine name of the entity type
string $bundle_type: The machine name of the bundle type
string $property_name: The machine name of the entity property being included as an extra field
Return value
array An array comprising the form for changing the property's widget
1 string reference to 'eck__remove_extra_field_form'
- eck__entity__menu in ./
eck.entity.inc - Entity related menu items.
File
- ./
eck.bundle.inc, line 828
Code
function eck__remove_extra_field_form($form, &$form_state, $entity_type, $bundle_type, $property_name) {
$bundle = bundle_load($entity_type, $bundle_type);
$form = array(
'#entity_type' => $entity_type,
'#bundle' => $bundle,
'#property_name' => $property_name,
);
return confirm_form($form, t('Are you sure you want to remove %title as a property field for the %bundle bundle?', array(
'%title' => $property_name,
'%bundle' => $bundle->label,
)), 'admin/structure/entity-type/' . $entity_type . '/' . $bundle_type . '/properties/' . $property_name, t("This will remove the property as an extra field on the %bundle bundle's field management page, but it does not delete the property from the entity type. This cannot be undone.", array(
'%bundle' => $bundle->label,
)), t('Remove'), t('Cancel'));
}