if ($action & (CRM_Core_Action::VIEW + CRM_Core_Action::BROWSE + CRM_Core_Action::BASIC + CRM_Core_Action::ADVANCED + CRM_Core_Action::PREVIEW)) {
return 'get';
}
+ if ($action & (CRM_Core_Action::DELETE)) {
+ return 'delete';
+ }
// If you get this exception try adding more cases above.
throw new Exception("Cannot determine api action for " . get_class($this) . '.' . 'CRM_Core_Action "' . CRM_Core_Action::description($action) . '" not recognized.');
}
// We can't load this field using metadata
continue;
}
+ if ($field != 'id' && $this->isDeleteContext()) {
+ // Delete forms don't generally present any fields to edit
+ continue;
+ }
// Resolve action.
if (empty($props['action'])) {
$props['action'] = $this->getApiAction();