Deletes a resource

@return string|null admin output to display or null for redirecting to the list
420813
public function delete()
	{
		$view = $this->getView();
		$context = $this->getContext();

		try
		{
			if( ( $id = $view->param( 'id' ) ) === null ) {
				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
			}

			$fs = $context->getFileSystemManager()->get( 'fs-admin' );
			$manager = \Aimeos\MAdmin::create( $context, 'job' );
			$item = $manager->getItem( $id );
			$result = $item->getResult();

			if( isset( $result['file'] ) && $fs->has( $result['file'] ) ) {
				$fs->rm( $result['file'] );
			}

			$manager->deleteItem( $id );
		}
		catch( \Aimeos\MAdmin\Exception $e )
		{
			$error = array( 'job-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->errors = $view->get( 'errors', [] ) + $error;
			$this->logException( $e );
		}
		catch( \Exception $e )
		{
			$error = array( 'job-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
			$view->errors = $view->get( 'errors', [] ) + $error;
			$this->logException( $e );
		}

		return $this->search();
	}
324547
public function delete($id = null)
    {
        $user = $this->Users->get($id);
        $this->request->allowMethod(['post', 'delete']);

        if ($this->Users->delete($user)) {
            $this->Flash->success(__('The user has been deleted.'));
        } else {
            $this->Flash->error(__('The user could not be deleted. Please, try again.'));
        }

        return $this->redirect(['action' => 'index']);
    }
936784
protected function RemovalObject()
    {
        $id = Request::PostData('delete');
        return $id ? User::Schema()->ByID($id) : null;
    }
1372122
public function delete()
    {
        self::$instance->reset();
        $this->sql('DELETE');
        $this->oosql_where = null;
        $numargs = func_num_args();

        if ($numargs > 0) {
            if ($numargs > 1) {
                $this->oosql_del_multiFlag = true;
                $this->oosql_del_numargs = $numargs;
            }
            $arg_list = func_get_args();
            if (is_array($arg_list[0])) {
                $this->sql(' FROM ' . $this->oosql_table);
                $this->where($arg_list[0][0] . ' = ?', $arg_list[0][1]);
                return $this;
            }
            $this->oosql_sql .= ' FROM';
            for ($i = 0; $i < $numargs; $i++) {
                if ($i != 0 && $numargs > 1) {
                    $this->sql(',');
                }
                $this->sql(' ' . $arg_list[$i]);
            }

        } else {
            $this->oosql_fromFlag = true;
        }


        return $this;
    }
1063098
public function delete()
    {
        $queryKeys = $this->prepareKeys(false);

        if (count($queryKeys) > 0) {
            return $this->redClient->del($queryKeys);
        }

        return false;
    }
1076487
public function deleteAll()
    {
        $this->request->allowMethod(['post', 'delete']);
        $this->BackupManager->deleteAll();
        $this->Flash->success(I18N_OPERATION_OK);

        return $this->redirect(['action' => 'index']);
    }
1369670
public function delete()
    {
        $this->_user->post('push/delete', array('id' => $this->getId()));
        // The delete API call doesn't return the object, so set the status
        // manually
        $this->_status = self::STATUS_DELETED;
    }
622431
public function delete()
    {
        if (null === $this->alSeo) {
            $exception = array(
                'message' => 'exception_seo_is_null',
                'parameters' => array(
                    '%className%' => get_class($this),
                ),
            );

            throw new General\ArgumentIsEmptyException(json_encode($exception));
        }

        $this->dispatchBeforeOperationEvent(
            '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Seo\BeforeSeoDeletingEvent',
            SeoEvents::BEFORE_DELETE_SEO,
            array(),
            array(
                'message' => 'exception_seo_deleting_aborted',
                'domain' => 'exceptions',
            )
        );

        try {
            $this->seoRepository->startTransaction();
            $result = $this->seoRepository
                        ->setRepositoryObject($this->alSeo)
                        ->delete();
            if (false !== $result) {
                $eventName = SeoEvents::BEFORE_DELETE_SEO_COMMIT;
                $result = !$this->eventsHandler
                            ->createEvent($eventName, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Seo\BeforeDeleteSeoCommitEvent', array($this, array()))
                            ->dispatch()
                            ->getEvent($eventName)
                            ->isAborted();
            }

            if (false !== $result) {
                $this->seoRepository->commit();

                $this->eventsHandler
                     ->createEvent(SeoEvents::AFTER_DELETE_SEO, '\RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Seo\AfterSeoDeletedEvent', array($this))
                     ->dispatch();

                return $result;
            }
            $this->seoRepository->rollBack();

            return $result;
        } catch (\Exception $e) {
            if (isset($this->seoRepository) && $this->seoRepository !== null) {
                $this->seoRepository->rollBack();
            }

            throw $e;
        }
    }
696705
public function delete($context = null)
    {
        $params[] = $this->getRealPath();
        $params[] = $context;

        return call_user_func_array('unlink', $params);
    }
78084
public function deleteAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth($this->resourceCode, $this->getModuleCode(), AccessManager::DELETE)) {
            return $response;
        }

        try {
            // Check token
            $this->getTokenProvider()->checkToken(
                $this->getRequest()->query->get("_token")
            );

            // Get the currency id, and dispatch the delete request
            $deleteEvent = $this->getDeleteEvent();

            $this->dispatch($this->deleteEventIdentifier, $deleteEvent);

            if (null !== $deletedObject = $this->getObjectFromEvent($deleteEvent)) {
                $this->adminLogAppend(
                    $this->resourceCode,
                    AccessManager::DELETE,
                    sprintf(
                        "%s %s (ID %s) deleted",
                        ucfirst($this->objectName),
                        $this->getObjectLabel($deletedObject),
                        $this->getObjectId($deletedObject)
                    ),
                    $this->getObjectId($deletedObject)
                );
            }

            $response = $this->performAdditionalDeleteAction($deleteEvent);

            if ($response == null) {
                return $this->redirectToListTemplate();
            } else {
                return $response;
            }
        } catch (\Exception $e) {
            return $this->renderAfterDeleteError($e);
        }
    }
1022227
public function deleteAction()
    {
        $leaderboardId = $this->getEvent()->getRouteMatch()->getParam('leaderboardId');
        $leaderboard = $this->getLeaderboardTypeService()->findById($leaderboardId);
        $name = $leaderboard->getName();
        $this->getLeaderboardTypeService()->remove($leaderboard);
        $this->flashMessenger()->addMessage('The leaderboard "'.$name.'"has been deleted');

        return $this->redirect()->toRoute('admin/leaderboardtype/list');
    }
1346584
public function delete() 
	{
		$settings = static::_model();

		$result = DB::delete( $settings['table'] )
			->where( $settings['primary_key'], $this->_data_store[$settings['primary_key']] )
			->limit(1)
			->run( $settings['handler'] );

		$this->_data_store[$cache['primary_key']] = null;

		return $result;
	}
737894
public function delete()
    {
        $memoryTableAnnotation = ModelManager::getAnnotation($this, MemoryTable::class);
        if(null === $memoryTableAnnotation)
        {
            return null;
        }
        MemoryTableManager::del($memoryTableAnnotation->name, $this->__key);
    }
522206
public function delete($data=null)
    {
        $url = URIResource::Make($this->path, array($this->id));
        return $this->client->delete($url);
    }
524334
public function delete(): int
    {
        $deleted = $this->createDeleteBuilder()->execute();

        $this->clearFetchParameters();

        return (int)$deleted;
    }
415107
public function delete()
        {
            $query = array(
                "DELETE FROM",
                $this->_quoteIdentifier($this->_table_name)
            );

            $this->_addIdColumnConditions($query);

            return self::_execute(join(" ", $query), Arrays::is($this->id(true)) ? array_values($this->id(true)) : array($this->id(true)), $this->_connection_name);
        }
411249
public function delete()
    {
        if ($this->request->isPost()) {
            $recordId = StaticFilter::filter(
                'text',
                $this->request->getPost('id')
            );

            $record = call_user_func_array(
                [$this->getModelName(), 'get'],
                [$recordId]
            );

            if (is_null($record)) {
                $this->addWarningMessage(
                    "The {$this->get('modelSingular')} with the provided key ".
                    "does not exists."
                );
            } else {
                if ($record->delete()) {
                    $this->addSuccessMessage(
                        "The {$this->get('modelSingular')} was successfully " .
                        "deleted."
                    );
                }
            }
        }
        return $this->redirect($this->_basePath .'/'.$this->get('modelPlural'));
    }