Deletes an existing Game model.
If deletion is successful, the browser will be redirected to the 'index' page.
@return mixed
510463
public function actionDelete()
    {
        $rr = new RequestResponse();
        if ($rr->isRequestAjaxPost()) {
            try {
                $model = $this->model;
                $id = $model->name;
                $model = $this->findModel($id);
                if (!in_array($model->item->name, CmsManager::protectedPermissions())) {
                    if (\Yii::$app->getAuthManager()->remove($model->item)) {
                        $rr->message = \Yii::t('app', 'Record deleted successfully');
                        $rr->success = true;
                    } else {
                        $rr->message = \Yii::t('app', 'Record deleted unsuccessfully');
                        $rr->success = false;
                    }
                } else {
                    $rr->message = \Yii::t('app', 'This entry can not be deleted!');
                    $rr->success = false;
                }
            } catch (\Exception $e) {
                $rr->message = $e->getMessage();
                $rr->success = false;
            }
            return (array)$rr;
        }
    }
492052
public function actionBatchDelete()
    {
        if (($ids = Yii::$app->request->post('ids')) !== null) {
            $models = $this->findModel($ids);
            foreach ($models as $model) {
                $model->delete();
            }
            return $this->redirect(['index']);
        } else {
            throw new HttpException(400);
        }
    }
90685
public function actionRemove()
    {
        $routes = Yii::$app->getRequest()->post('routes', []);
        $model = new Route();
        $model->remove($routes);
        Yii::$app->getResponse()->format = 'json';
        return $model->getRoutes();
    }
459544
public function delete()
	{
		$this->frozen(true);
		$query = \DB::delete(static::$_table_name)
		            ->where(static::primary_key(), '=', $this->{static::primary_key()});

		$this->pre_delete($query);
		$result = $query->execute(static::get_connection(true));

		return $this->post_delete($result);
	}
527089
public function indexAction()
    {
        $isSubscribed = false;

        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
        if ($entry) {
            $isSubscribed = true;
        }

        $viewModel = $this->buildView($this->game);
        $viewModel->setVariables(array(
            'isSubscribed' => $isSubscribed,
        ));

        return $viewModel;
    }
941922
public function delete()
    {
        // convert to condition.
        $args = func_get_args();
        $cond = call_user_func_array(array($this, 'toCondition'), $args);

        // to SQL.
        $sql = $cond->toDeleteSQL();
        var_dump($sql, $cond->getParams());

        // query.
        $sth = $this->query($sql, $cond->getParams());
        return $sth->isSuccess();
    }
667260
public static function delete()
    {
        $result = null;

        switch (static::getDriver()) {
            case self::DRIVER_MYSQL:
                $result = new \pwf\components\querybuilder\adapters\MySQL\DeleteBuilder();
                break;
            case self::DRIVER_PG:
                $result = new \pwf\components\querybuilder\adapters\PostgreSQL\DeleteBuilder();
                break;
            default:
                throw new \Exception('Wrong query builder driver');
        }

        return $result;
    }
502814
public function actionDeleteIn()
    {
        $selected = Yii::$app->request->post('selected' , []);

        $ret = \yongtiger\admin\models\Log::deleteAll(['id' => explode(',', $selected)]);
        $str = $ret > 0 ? ' (IDs [' . $selected . '])' : '';
        Yii::$app->session->setFlash('info', Module::t('message', 'Deleted {0} logs.', $ret) . $str);

        return $this->redirect(['index']);
    }
239904
public function delete()
    {
        $query = $this->getDeleteQuery();

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

        return $query->delete();
    }
619487
public function delete()
    {
        $ret = $this->conn()->selectCollection($this->table_name)->remove($this->where);
        $this->sql = array('table'=> $this->table_name,'where'=>$this->where);

        $this->_clear_var();
        return $ret;
    }
1150148
public function removeAction()
    {
        $success = 0;
        $message = 'tr_melis_cms_prospects_theme_delete_failed';
        $errors  = [];
        $title   = 'tr_melis_cms_prospects_theme';
        $request = $this->getRequest();
        $id      = null;

        if($request->isPost()) {
            $id        = (int) $request->getPost('id');
            $checkData = $this->themeTable()->getEntryById($id)->current();

            if($checkData) {
                $this->themeTable()->deleteById($id);
                $this->themeItemTable()->deleteByField('pros_theme_id', $id);
                $success = 1;
                $message = 'tr_melis_cms_prospects_theme_delete_success';
            }

        }

        $response = [
            'success'     => $success,
            'errors'      => $errors,
            'textMessage' => $this->tool()->getTranslation($message),
            'textTitle'   => $this->tool()->getTranslation($title)
        ];

        $this->getEventManager()->trigger('meliscmsprospects_theme_delete_end', $this, array_merge($response, array('typeCode' => 'CMS_PROSPECTS_THEME_DELETE', 'itemId' => $id)));

        return new JsonModel($response);
    }
487160
public function deleteModel(): bool
    {
        $this->getFromForm();
        $this->is_deleted = true;
        if (!$this->save()) {
            throw new \Exception(\Yii::t('app', 'Ошибка при удалении кода'));
        }
        return true;
    }
837813
public function delete()
    {
        $data = $this->getData();
        if (isset($this->currentId))
        {
            unset($data[$this->currentKey]);
        }
        else
        {
            $this->pending();
            $old  = $data;
            $data = array_diff_key($old, $this->data);
        }
        $this->data = array_values($data);

        return Helpers\Data::table($this->name)->put($this->data) ? true : false;
    }
655541
public function delete() {
		$this->request->allowMethod('post', 'delete');
		$data = $this->request->query;
		if (empty($data)) {
			throw new InternalErrorException(__d('cake_settings_app', 'Invalid task'));
		}

		if ($this->QueueInfo->deleteTasks($data)) {
			$this->Flash->success(__d('cake_settings_app', 'The task has been deleted.'));
		} else {
			$this->Flash->error(__d('cake_settings_app', 'The task could not be deleted. Please, try again.'));
		}

		$urlRedirect = ['plugin' => 'cake_settings_app', 'controller' => 'queues', 'action' => 'index'];
		return $this->redirect($urlRedirect);
	}
136019
public function delete()
	{
		JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

		// Get items to remove from the request.
		$cid = $this->input->get('cid', array(), 'array');
		$extension = $this->input->getCmd('extension', null);

		if (!is_array($cid) || count($cid) < 1)
		{
			JError::raiseWarning(500, JText::_($this->text_prefix . '_NO_ITEM_SELECTED'));
		}
		else
		{
			// Get the model.
			/** @var CategoriesModelCategory $model */
			$model = $this->getModel();

			// Make sure the item ids are integers
			$cid = ArrayHelper::toInteger($cid);

			// Remove the items.
			if ($model->delete($cid))
			{
				$this->setMessage(JText::plural($this->text_prefix . '_N_ITEMS_DELETED', count($cid)));
			}
			else
			{
				$this->setMessage($model->getError());
			}
		}

		$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&extension=' . $extension, false));
	}
568627
public function deleteAction()
    {
        $model = $this->getModel();
        $model->applyRequest($this->getRequest());

        $model->delete();
        $this->_reroute(array($this->getRequest()->getActionKey() => 'index', MUTil_Model::REQUEST_ID => null));
    }
262883
public function delete()
	{
		$query = $this->getDeleteQuery();

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

		return $query->delete();
	}