Deletes post
@param string $id Post ID
@return \Cake\Network\Response|null|void
336725
public function delete($id = null)
    {
        $this->request->allowMethod(['post', 'delete']);

        $this->Posts->deleteOrFail($this->Posts->get($id));
        $this->Flash->success(I18N_OPERATION_OK);

        return $this->redirect(['action' => 'index']);
    }
415930
public function delete($id = null): bool
	{
		$instance = $this->read($id);

		return $instance->delete();
	}
124218
public function delete($id = null)
    {
        if (is_null($id) || is_array($id)) {
            return $this->deleteMany($id);
        }

        $response = $this->ontraport->delete(
            $this->getSingularNamespace(), $this->toArray(compact('id'))
        );

        return $this->ontraport->item($this, $response);
    }
1192511
public function deleteFromFlexiBee($id = null)
    {
        if (is_null($id)) {
            $id = $this->getMyKey();
        }

        $this->performRequest($this->getEvidenceUrl().'/'.self::urlizeId($id),
            'DELETE');
        return $this->lastResponseCode == 200;
    }
1123486
public function delete($id = null)
    {
        if ($this->loaded() && !is_null($id) && ($id !== $this->id)) {
            throw $this->exception('Unable to determine which record to delete');
        }
        if (!is_null($id) && (!$this->loaded() || ($this->loaded() && $id !== $this->id))) {
            $this->load($id);
        }
        if (!$this->loaded()) {
            throw $this->exception('Unable to determine which record to delete');
        }
        $id = $this->id;

        $this->hook('beforeDelete', array($id));
        $this->controller->delete($this, $id);
        $this->hook('afterDelete', array($id));

        $this->unload();

        return $this;
    }
781393
public function delete(?string $id = null)
    {
        $this->request->allowMethod(['post', 'delete']);
        $calendarEvent = $this->CalendarEvents->get($id);
        if ($this->CalendarEvents->delete($calendarEvent)) {
            $this->Flash->success((string)__('The calendar event has been deleted.'));
        } else {
            $this->Flash->error((string)__('The calendar event could not be deleted. Please, try again.'));
        }

        return $this->redirect(['plugin' => 'Qobo/Calendar', 'controller' => 'Calendars', 'action' => 'index']);
    }
827603
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        $model->delete();

        return $this->redirect(['index']);
    }
732870
public function delete($id)
    {
        $supported = $this->isSupported('delete');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/'.$id.'/delete', array(), 'DELETE') : $supported;
    }
833885
public function delete($id = null)
    {
        $this->request->allowMethod(['post', 'delete']);

        $position = $this->BannersPositions->get($id);

        //Before deleting, it checks if the position has some banners
        if (!$position->banner_count) {
            $this->BannersPositions->deleteOrFail($position);
            $this->Flash->success(I18N_OPERATION_OK);
        } else {
            $this->Flash->alert(I18N_BEFORE_DELETE);
        }

        return $this->redirect(['action' => 'index']);
    }
225375
public function delete($id) {
        return $this->request("DELETE", self::URL_PLANS . $id . "/", $api_key = $this->culqi->api_key);
    }
30402
public function actionDelete($id)
	{
		//$this->loadModel($id)->delete();

		// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
		//if(!isset($_GET['ajax']))
		//	$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
                
                
                
                $model = $this->loadModel($id);
				
		$sql = 'ALTER TABLE '.BaseCccdCompanyData::model()->tableName().' DROP `'.$model->varname.'`';
				if ($model->dbConnection->createCommand($sql)->execute()) {
					$model->delete();
				}
			

		// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
		if(!isset($_POST['ajax']))
				$this->redirect(array('admin'));
		
		else
			throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');
	

	}
509531
public function delete($id = null)
	{
		$wheres = $this->compileWheres();

		foreach ($this->get() as $entity)
		{
			$this->collection->remove($entity);
		}
	}
928301
public function delete($id)
    {
        return $this->model->where($this->model->getKeyName(), $id)->delete();
    }
202806
public function delete($id = null) {
		$this->request->allowMethod('post');
		$log = $this->DatabaseLogs->get($id);

		if ($this->DatabaseLogs->delete($log)) {
			$this->Flash->success(__('Log deleted'));
			return $this->redirect(['action' => 'index']);
		}
		$this->Flash->error(__('Log was not deleted'));
		return $this->redirect(['action' => 'index']);
	}
1042493
public function delete(string $id = null): void
    {
        $this->request->allowMethod(['post', 'delete']);
        $menu = $this->Menus->get($id);
        if ($this->Menus->delete($menu)) {
            $this->Flash->success((string)__('The menu has been deleted.'));
        } else {
            $this->Flash->error((string)__('The menu could not be deleted. Please, try again.'));
        }

        $this->redirect(['action' => 'index']);
    }
240763
public function delete($id)
    {
        $id = (int) $id;
        if ($id <= 0) {
            throw new Exception('Invalid param id');
        }
        return $this->rest->delete("$this->action/$id");
    }
875119
public function delete(string $id = null)
    {
        $this->request->allowMethod(['post', 'delete']);
        $role = $this->Roles->get($id);
        if ($this->Roles->delete($role)) {
            $this->Flash->success((string)__('The role has been deleted.'));
        } else {
            $this->Flash->error((string)__('The role could not be deleted. Please, try again.'));
        }

        return $this->redirect(['action' => 'index']);
    }