You are here

function openlayers_ui_object_delete in Openlayers 6.2

Menu callback for object delete form.

1 string reference to 'openlayers_ui_object_delete'
openlayers_ui_menu in modules/openlayers_ui/openlayers_ui.module
Implementation of hook_menu

File

modules/openlayers_ui/openlayers_ui.module, line 460

Code

function openlayers_ui_object_delete(&$form_state, $type, $object) {
  if ($object->export_type & EXPORT_IN_DATABASE) {

    // Create delete form
    $form = array(
      'type' => array(
        '#type' => 'value',
        '#value' => $type,
      ),
      'object' => array(
        '#type' => 'value',
        '#value' => $object,
      ),
    );
    $message = $object->export_type & EXPORT_IN_CODE ? t('Are you sure you want to revert %object?', array(
      '%object' => $object->title,
    )) : t('Are you sure you want to delete %object?', array(
      '%object' => $object->title,
    ));
    return confirm_form($form, $message, 'admin/build/openlayers/' . $type);
  }
}