Delete Command for an entity.

@param LibBaseTemplateObject $command The action object
170880
protected function _commandDelete($command)
    {
        $entity = $this->getController()->getItem();

        $command->append(array('label' => AnTranslator::_('LIB-AN-ACTION-DELETE')))
        ->href(route($entity->getURL()))
        ->setAttribute('data-action', 'delete')
        ->setAttribute('data-redirect', route('index.php?option=com_locations&view=locations'))
        ->class('action-delete');
    }
1231121
protected function _commandDeleteLocation($command)
    {
        $location = $this->getController()->getItem();
        $locatable = $command->locatable;

        $command->setAttribute('data-action', 'deleteLocation')
        ->setAttribute('data-location', $location->id)
        ->href($locatable->getURL());

        $command->label = translate('LIB-AN-ACTION-DELETE');
    }
758856
protected function _commandView($command)
    {
        $entity = $this->getController()->getItem();
        $command->append(array('label' => AnTranslator::_('COM-ARTICLES-ARTICLE-CURRENT-VERSION')));
        $command->href('option=com_articles&view=article&id='.$entity->parent->id);
    }
428694
public function handle($command)
    {
        if (!is_object($command)) {
            throw InvalidCommandException::forUnknownValue($command);
        }

        $middlewareChain = $this->middlewareChain;
        return $middlewareChain($command);
    }
1229192
protected function registerMakeMailCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Generators\Commands\MailMakeCommand($app);
        });
    }
730360
function unregisterCommand(\CharlotteDunois\Livia\Commands\Command $command) {
        $group = $this->resolveGroup($command->groupID);
        $group->commands->delete($command->name);
        $this->commands->delete($command->name);
        
        $this->client->emit('debug', 'Unregistered command '.$command->groupID.':'.$command->name);
        $this->client->emit('commandUnregister', $command, $this);
        
        return $this;
    }
833449
protected function registerDatabaseCleanCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Database\Commands\DatabaseCleanCommand($app);
        });
    }
339054
public function command($command, $method) {

        self::$commands[] = $command;
        self::$callbacks[$command] = $method;
    }
425668
public function executeCommand($command)
    {
        $cmd = sprintf('%s %s', $this->binaryPath, $command);
        $p = new Process($cmd);
        $p->run();
        if ($p->isSuccessful()) {
            return $p->getOutput();
        } else {
            throw new \RuntimeException(sprintf('pygmentize failed with the error: %s', $p->getErrorOutput()));
        }
    }
435298
public function unregisterSubCommand($command)
    {
        if (! array_key_exists($command, $this->subCommands)) {
            throw new \Exception("A sub-command with the name {$command} does not exist.");
        }

        unset($this->subCommands[$command]);
    }
773886
final public function execute($command, AnCommandContext $context)
    {
        $identifier = $context->caller->getIdentifier();

        if ($context->entity instanceof AnDomainEntityAbstract) {
            $identifier = $context->entity->getIdentifier();
        }

        $type = $identifier->path;
        $type = array_pop($type);

        $parts = explode('.', $command);
        $method = '_'.($parts[0]).ucfirst($type).ucfirst($parts[1]);

        $result = null;

        if (method_exists($this, $method)) {
            $result = $this->$method($context);
        }

        if ($context->entity) {
            $result = $context->entity->execute($command, $context);
        }

        return $result;
    }
700671
public function unregisterCommand($command)
    {
        if (! array_key_exists($command, $this->commands)) {
            throw new \Exception("A command with the name {$command} does not exist.");
        }

        unset($this->commands[$command]);
    }
1299012
public function add(SymfonyCommand $command)
    {
        if ($command instanceof Command) {
            $command->setCygnite($this->cygnite);
        }

        return $this->addCommandToParent($command);
    }
1274184
private function setShellCommand($command)
    {
        if (! isset($command)) {
            throw new InvalidArgumentException('Must define a command.');
        }

        if (isset($this->shellCommand) && $this->shellCommand !== $command) {
            throw new LogicException('Cannot redefine command once set!');
        }

        $this->shellCommand = $command;

        return $this;
    }
947536
public function handle(RemoveComponentCommand $command)
    {
        $component = $command->component;

        event(new ComponentWasRemovedEvent($this->auth->user(), $component));

        $component->delete();
    }
693419
public function execute(\Sigbits\RoombaLib\SCI\Command $command)
    {
        $this->connection->write($command);
    }
469485
public function fire(Command $command)
    {
        $gitignorePath = base_path('.gitignore');

        if (! $this->gitignoreContainsComposerLock($gitignorePath)) {
            return;
        }

        $removeComposerLock = $command->confirm('Do you want to remove composer.lock from .gitignore ?', true);
        if ($removeComposerLock) {
            $out = $this->getGitignoreLinesButComposerLock($gitignorePath);
            $this->writeNewGitignore($gitignorePath, $out);
        }
    }