Customize the sticky command.

@param LibBaseTemplateObject $command Command Object
557554
protected function _commandPin($command)
    {
        $entity = $this->getController()->getItem();

        $label = ($entity->pinned) ? AnTranslator::_('LIB-AN-ACTION-UNPIN') : AnTranslator::_('LIB-AN-ACTION-PIN');

        $command
        ->append(array('label' => $label))
        ->href($entity->getURL().'&action='.($entity->pinned ? 'unpin' : 'pin'))
        ->setAttribute('data-trigger', 'PostLink');
    }
229668
protected function forceCommand($command)
    {
        if ((
            Str::startsWith($command, 'migrate') === true && Str::startsWith($command, 'migrate:status') === false ||
            Str::startsWith($command, 'db:seed') === true
        ) && strpos($command, '--force') === false) {
            $command .= ' --force';
        }

        if ((
            is_null($this->laravel) === false &&
            version_compare($this->laravel->version(), 5.5, '>=') &&
            Str::startsWith($command, 'vendor:publish') === true
        ) && strpos($command, '--all') === false) {
            $command .= ' --all';
        }

        return $command;
    }
1209845
public function addCommand(Command $command)
    {
        if (is_string($command)) {
            $command = new $command;
        }
        $map = (new CommandMapping($this->parser))->map($command);

        CommandBag::add($map->name, [
            'object' => $command,
            'map' => $map
        ]);

        return $this;
    }
910476
public function setCommand($command): void
    {
        $this->log(
            "The command attribute is deprecated.\nPlease use the executable attribute and nested arg elements.",
            Project::MSG_WARN
        );
        $this->commandline = new Commandline($command);
        $this->executable = $this->commandline->getExecutable();
    }
1079062
protected function forceCommand($command)
    {
        return (
            starts_with($command, 'migrate') === true && starts_with($command, 'migrate:status') === false ||
            starts_with($command, 'db:seed') === true
        ) && strpos('command', '--force') === false ?
            $command .= ' --force' : $command;
    }
272554
public function command($command)
    {
        if ($command instanceof CommandInterface) {
            $command->setContainer($this);
        }

        $this['console']->add($command);
    }
692019
protected function registerMakeAddonCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Addons\Commands\AddonMakeCommand($app);
        });
    }
41300
public function add(BaseCommand $command)
    {
        if ($ret = parent::add($command)) {
            if ($ret instanceof ContextAware) {
                $ret->setContext($this->context);
            }

            if ($ret instanceof PresenterAware) {
                $ret->setPresenter($this->config->getPresenter());
            }

            if (isset($this->commandsMatcher)) {
                $this->commandsMatcher->setCommands($this->all());
            }
        }

        return $ret;
    }
344069
public static function configure(Command $command)
    {
        $command->setName('migrations:list')
            ->setDescription('Prints version IDs for all available migrations ordered incrementally.')
            ->addOption(
                'newest-first',
                null,
                InputOption::VALUE_NONE,
                'Sort list in reverse order (newest first)'
            );
    }
130743
protected function _commandNew($command)
    {
        $name = $this->getController()->getIdentifier()->name;

        $command
        ->append(array('label' => AnTranslator::_('COM-UBSCRIPTIONS-TOOLBAR-'.$name.'-NEW')))
        ->href('#')
        ->setAttribute('data-trigger', 'ReadForm');
    }
936920
public function add(Command $command)
    {
        $command->setApplication($this);

        if (!$command->isEnabled()) {
            $command->setApplication(null);

            return;
        }

        if (null === $command->getDefinition()) {
            throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command)));
        }

        $this->commands[$command->getName()] = $command;

        foreach ($command->getAliases() as $alias) {
            $this->commands[$alias] = $command;
        }

        return $command;
    }
553825
protected function _commandCommentstatus($command)
    {
        $entity = $this->getController()->getItem();

        $label = $entity->openToComment ? AnTranslator::_('LIB-AN-ACTION-CLOSE-COMMENTING') : AnTranslator::_('LIB-AN-ACTION-OPEN-COMMENTING');
        $status = $entity->openToComment ? 0 : 1;

        $command->append(array('label' => $label))
        ->href($entity->getURL())
        ->class('action-commentstatus')
        ->setAttribute('data-action', 'commentstatus')
        ->setAttribute('data-status', $status);
    }
696630
public function addCommand($command)
    {
        if (is_array($command)) {
            foreach ($command as $cmd) {
                $this->addCommand($cmd);
            }
        }

        if (is_string($command)) {
            $command = new Command($command);
            $this->commandsList[] = $command;
        }

        return $this;
    }
351973
protected function executeDecorators($command)
    {
        foreach ($this->decorators as $className)
        {
            $instance = $this->app->make($className);

            if ( ! $instance instanceof CommandBus)
            {
                $message = 'The class to decorate must be an implementation of Laracasts\Commander\CommandBus';

                throw new InvalidArgumentException($message);
            }

            $instance->execute($command);
        }
    }
1040633
protected function registerMakeEventCommand($command)
     {
         $this->app->singleton($command, function ($app) {
             return new Generators\Commands\EventMakeCommand($app);
         });
     }
1109911
public function executeCustomCommand($command, $entity)
    {
        $commandClass = $this->customCommands[$command];

        if ($this->manager->isTraversable($entity)) {
            foreach ($entity as $instance) {
                $this->executeSingleCustomCommand($commandClass, $instance);
            }
        } else {
            return $this->executeSingleCustomCommand($commandClass, $entity);
        }
    }
642898
public function addCommand(Command $command) {
        $this->commands[$command->getName()] = $command;
        $command->freeze();
        return $this;
    }