Delete a record by primary key.
/** * Delete a particular activity item. * * @param int $ActivityID The unique ID of activity to be deleted. * @param array $Options Not used. * @return bool Returns **true** if the activity was deleted or **false** otherwise. */ public function deleteID($ActivityID, $Options = []) { // Get the activity first. $Activity = $this->getID($ActivityID); if ($Activity) { // Log the deletion. $Log = val('Log', $Options); if ($Log) { LogModel::insert($Log, 'Activity', $Activity); } // Delete comments on the activity item $this->SQL->delete('ActivityComment', ['ActivityID' => $ActivityID]); // Delete the activity item return parent::deleteID($ActivityID); } else { return false; } }