function eck__property_delete__form in Entity Construction Kit (ECK) 7.3
Property delete form.
1 string reference to 'eck__property_delete__form'
- eck__bundle__menu in ./
eck.bundle.inc - This function creates the menu items relevant to bundle administration.
File
- ./
eck.properties.inc, line 266 - Properties.
Code
function eck__property_delete__form($form, &$state, $entity_type_name, $property) {
$entity_type = EntityType::loadByName($entity_type_name);
$properties = $entity_type->properties;
if (array_key_exists($property, $properties)) {
$form['entity_type'] = array(
'#type' => 'value',
'#value' => $entity_type,
);
$form['property'] = array(
'#type' => 'value',
'#value' => $property,
);
$form['confirmation'] = confirm_form($form, "Are you sure you want to delete {$property}", eck__entity_type__path() . "/{$entity_type->name}/property");
}
else {
// @todo are we really using drupal_goto?
drupal_set_message('This property does not exists');
drupal_goto(eck__entity_type__path() . "/{$entity_type->name}/property");
}
return $form;
}