CRM_Utils_System::flushCache();
if ($this->_action & CRM_Core_Action::DELETE) {
- CRM_Core_BAO_LocationType::del($this->_id);
+ CRM_Core_BAO_LocationType::deleteRecord(['id' => $this->_id]);
CRM_Core_Session::setStatus(ts('Selected Location type has been deleted.'), ts('Record Deleted'), 'success');
return;
}
if ($this->_action == CRM_Core_Action::DELETE) {
if ($this->_id) {
- CRM_Core_BAO_Mapping::del($this->_id);
+ CRM_Core_BAO_Mapping::deleteRecord(['id' => $this->_id]);
CRM_Core_Session::setStatus(ts('Selected mapping has been deleted successfully.'), ts('Deleted'), 'success');
}
}
public function postProcess() {
if ($this->_action & CRM_Core_Action::DELETE) {
// delete reminder
- CRM_Core_BAO_ActionSchedule::del($this->_id);
+ CRM_Core_BAO_ActionSchedule::deleteRecord(['id' => $this->_id]);
CRM_Core_Session::setStatus(ts('Selected Reminder has been deleted.'), ts('Record Deleted'), 'success');
if ($this->getContext() === 'event' && $this->getComponentID()) {
$url = CRM_Utils_System::url('civicrm/event/manage/reminder',
* @return bool|int
*/
public static function del($id) {
+ CRM_Core_Error::deprecatedFunctionWarning('deleteRecord');
try {
self::deleteRecord(['id' => $id]);
}
* @return mixed|null
*/
public static function del($id) {
+ CRM_Core_Error::deprecatedFunctionWarning('deleteRecord');
if (!$id) {
return NULL;
}
}
if (!empty($params['id'])) {
if ($this->_action & CRM_Core_Action::DELETE) {
- CRM_Campaign_BAO_Campaign::del($params['id']);
+ CRM_Campaign_BAO_Campaign::deleteRecord(['id' => $params['id']]);
CRM_Core_Session::setStatus(ts('Campaign has been deleted.'), ts('Record Deleted'), 'success');
$session->replaceUserContext(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=campaign'));
return;
if ($this->_surveyId) {
if ($this->_action & CRM_Core_Action::DELETE) {
- CRM_Campaign_BAO_Survey::del($this->_surveyId);
+ CRM_Campaign_BAO_Survey::deleteRecord(['id' => $this->_surveyId]);
CRM_Core_Session::setStatus(ts(' Petition has been deleted.'), ts('Record Deleted'), 'success');
$session->replaceUserContext(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=petition'));
return;
*/
public function postProcess() {
if ($this->_surveyId) {
- CRM_Campaign_BAO_Survey::del($this->_surveyId);
+ CRM_Campaign_BAO_Survey::deleteRecord(['id' => $this->_surveyId]);
CRM_Core_Session::setStatus('', ts("'%1' survey has been deleted.", [1 => $this->_surveyTitle]), 'success');
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey'));
}
* @throws \CRM_Core_Exception
*/
public static function add(array $params): CRM_Core_DAO_ActionSchedule {
+ CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
return self::writeRecord($params);
}
* @throws CRM_Core_Exception
*/
public static function del($id) {
+ CRM_Core_Error::deprecatedFunctionWarning('deleteRecord');
self::deleteRecord(['id' => $id]);
}
* @deprecated
*/
public static function del($locationTypeId) {
+ CRM_Core_Error::deprecatedFunctionWarning('deleteRecord');
static::deleteRecord(['id' => $locationTypeId]);
}
* @return bool
*/
public static function del($id) {
+ CRM_Core_Error::deprecatedFunctionWarning('deleteRecord');
return (bool) static::deleteRecord(['id' => $id]);
}
//Delete repeat configuration and rebuild
if (!empty($params['id'])) {
- CRM_Core_BAO_ActionSchedule::del($params['id']);
+ CRM_Core_BAO_ActionSchedule::deleteRecord($params);
unset($params['id']);
}
- $actionScheduleObj = CRM_Core_BAO_ActionSchedule::add($dbParams);
+ $actionScheduleObj = CRM_Core_BAO_ActionSchedule::writeRecord($dbParams);
//exclude dates
$excludeDateList = [];
$deleted = 0;
$tag = civicrm_api3('tag', 'getsingle', ['id' => $this->_id[0]]);
foreach ($this->_id as $id) {
- if (CRM_Core_BAO_Tag::del($id)) {
+ if (CRM_Core_BAO_Tag::deleteRecord(['id' => $id])) {
$deleted++;
}
}