Delete the scheduled event.

@return bool
967685
public function delete()
    {
        $this->getLogger()->info('Deleting scheduled event ID ' . $this->eventId);
        $this->doDelete('/schedule/' . $this->eventId);

        return true;
    }
199182
public function trashed()
    {
        $field = $this->getDeleteTimeField();

        if ($field && !empty($this->getOrigin($field))) {
            return true;
        }

        return false;
    }
499555
public function detach()
    {
        $this->calendar->getEvents()->removeEvent($this);
        $this->calendar = null;

        return $this;
    }
920985
final public function delete() {
	
		if (!$this->getId()) return FALSE;
		
		// trigger a custom function before deletion
		$this->beforeDelete();
		
		$class = get_called_class();
		
		// build the SQL where line
		$where = ' WHERE ' . implode(' AND ', $this->getSqlKeyConditions());
		
		$query = 'DELETE FROM `' . $class::TABLE_NAME . '`' . $where . ' LIMIT 1';
		$res = $this->db->exec($query, $this->getSqlKeyValues());
		
		// list properties to not remove
		$activeRecordsProperties = array('db', 'loadedFromDb', 'typeList', 'errors');
		
		// unset all properties
		foreach ($this as $key => $value) {
			if (!in_array($key, $activeRecordsProperties)) {
				unset($this->$key);
			}
		}
		
		$this->loadedFromDb = FALSE;
		
		// trigger a custom function after deletion
		$this->afterDelete();

		return (bool)$res;
		
	}
11471
public function delete()
    {
        if (isset($this->onDelete)) {
            return call_user_func($this->onDelete, $this);
        }

        $this->forceDelete();
    }
566361
public function preDelete(DeleteEvent $event)
    {
        $announcement = $event->getObject();
        $send = $this->om->getRepository(AnnouncementSend::class)->findBy(['announcement' => $announcement]);

        foreach ($send as $el) {
            $this->om->remove($el);
        }

        // delete scheduled task is any
        $this->manager->unscheduleMessage($announcement);

        $this->eventDispatcher->dispatch(
            'log',
            'Claroline\\AnnouncementBundle\\Event\\Log\\LogAnnouncementDeleteEvent',
            [$announcement->getAggregate(), $announcement]
        );
    }
906294
public function delete()
	{
		$db = \App::get('db');

		if (empty($db))
		{
			return false;
		}

		if (!is_numeric($this->gidNumber))
		{
			$db->setQuery("SELECT gidNumber FROM `#__xgroups` WHERE cn=" . $db->quote($this->cn) . ";");

			$gidNumber = $db->loadResult();

			if (!is_numeric($this->gidNumber))
			{
				return false;
			}

			$this->gidNumber = $gidNumber;
		}

		$db->setQuery("DELETE FROM `#__xgroups` WHERE gidNumber=" . $db->quote($this->gidNumber) . ";");

		$result = $db->query();

		if ($result === false)
		{
			return false;
		}

		$db->setQuery("DELETE FROM `#__xgroups_applicants` WHERE gidNumber=" . $db->quote($this->gidNumber) . ";");
		$db->query();
		$db->setQuery("DELETE FROM `#__xgroups_invitees` WHERE gidNumber=" . $db->quote($this->gidNumber) . ";");
		$db->query();
		$db->setQuery("DELETE FROM `#__xgroups_managers` WHERE gidNumber=" . $db->quote($this->gidNumber) . ";");
		$db->query();
		$db->setQuery("DELETE FROM `#__xgroups_members` WHERE gidNumber=" . $db->quote($this->gidNumber) . ";");
		$db->query();

		//trigger the onAfterStoreGroup event
		\Event::trigger('user.onAfterStoreGroup', array($this));

		return true;
	}
265750
public function delete(): bool
    {
        $isSoftDeleted = array_key_exists('Illuminate\Database\Eloquent\SoftDeletes', class_uses($this));
        if ($this->exists && ! $isSoftDeleted) {
            $this->roles()->detach();
        }

        return parent::delete();
    }
1150464
public function remove()
    {
        //dallocate shared memory
        if (!shm_remove($this->shm)) {
            return false;
        }
        $this->dettach();
        // shm_remove maybe not working. it likes a php bug.
        unset($this->shm);

        return true;
    }
1226392
public function delete()
    {
        if ($this->id == 0 || $this->id == ADMIN_ID) return FALSE;
		$conn = self::getDbConnection();
		$str = 'DELETE [LOGIN='.$this->login.'][ID='.$this->id.']';
        $conn->executeQuery('DELETE FROM users_groups_membership WHERE user_id='.$this->id);
        $conn->executeQuery('DELETE FROM users_auth WHERE user_id='.$this->id);
        parent::delete();
			
	    Event::trigger(EVENT_CORE_USER_PROP,['message' => $str]);
    }
239904
public function delete()
    {
        $query = $this->getDeleteQuery();

        $query->where($this->morphType, $this->morphClass);

        return $query->delete();
    }
372207
def delete(self, **kwargs):
        
        response = self._requester.request(
            'DELETE',
            'calendar_events/{}'.format(self.id),
            _kwargs=combine_kwargs(**kwargs)
        )
        return CalendarEvent(self._requester, response.json())
1181674
public function delete()
    {
        if ($this->exists())
        {
            $deletedLeft = $this->left->delete();
            $deletedRight = $this->right->delete();

            return $deletedLeft && $deletedRight;
        }

        return false;
    }
759653
public function delete(): bool
	{
		if($this->isPersisted)
		{
			$deleted = $this->deleteRecord($this->builder());

			if($deleted)
			{
				$this->isPersisted = false;
				$this->original    = [];
				$this->related     = [];
			}

			return $deleted;
		}

		return false;
	}
272385
public function delete()
    {
        $this->exitIfModelNotSet();

        $params = [
            'id'    => $this->model->getKey(),
            'type'  => $this->model->getDocumentType(),
            'index' => $this->model->getDocumentIndex(),
        ];

        // check if the document exists before deleting
        if ($this->connection->existsStatement($params)) {
            return $this->connection->deleteStatement($params);
        }

        return true;
    }
1161051
public function delete()
    {
        if (!$this->allow_delete) {
            throw $this->exception('Deleting is not allowed');
        }

        $m = $this->model;
        if (!$m->loaded()) {
            throw $this->exception('Cowardly refusing to delete all records');
        }

        $m->delete();

        return true;
    }
1005581
public function delete()
    {
        $mapper = Pheasant::instance()->mapperFor($this);

        $this->events()->wrap(array('Delete'), $this, function($obj) use ($mapper) {
            $mapper->delete($obj);

            // ensure we clear the changes before after events fire
            $obj->markSaved(false)->clearChanges();
        });

        return $this;
    }