You are here

function eck__entity_type__delete_form in Entity Construction Kit (ECK) 7.2

Same name and namespace in other branches
  1. 7.3 eck.entity_type.inc \eck__entity_type__delete_form()
  2. 7 eck.entity_type.inc \eck__entity_type__delete_form()

Delete entity type form callback.

1 string reference to 'eck__entity_type__delete_form'
eck__bundle__menu in ./eck.bundle.inc
This function creates the menu items relevant to bundle administration.

File

./eck.entity_type.inc, line 282
ENTITY TYPE.

Code

function eck__entity_type__delete_form($form, &$state, $entity_type_name) {
  $path = eck__entity_type__path();
  $entity_type = entity_type_load($entity_type_name);
  $form['entity_type'] = array(
    '#type' => 'value',
    '#value' => $entity_type,
  );
  $form['submit_redirect'] = array(
    '#type' => 'value',
    '#value' => $path,
  );
  $message = t("Are you sure that you want to delete the entity type %entity_type?", array(
    "%entity_type" => $entity_type->label,
  ));
  $caption = t("All of the data (entities and bundles) from this entity type will be deleted. This action cannot be undone.");
  return confirm_form($form, $message, $path, $caption, t('Delete'));
}