Disable the toggle command.

@param CommandCollectionInterface $commands The commands collection.

@return void
422450
private function disableToggleCommand(CommandCollectionInterface $commands)
    {
        foreach ($commands->getCommands() as $command) {
            if (!($command instanceof ToggleCommandInterface)) {
                continue;
            }

            $this->disableCommandByActionName($commands, $command->getName());
        }
    }
128369
protected function setBreakOnFailure(CommandInterface $command, array $definition)
    {
        if (isset($definition[static::CONFIG_BREAK_ON_FAILURE])) {
            $command->setBreakOnFailure($definition[static::CONFIG_BREAK_ON_FAILURE]);
        }
    }
216393
public function commands(CommandCollector $command)
    {
        $commands = array(
            'modules' => CL::class . '::modulesCommand',
            'about' => CL::class . '::aboutCommand',
            'install' => CL::class . '::installCommand',
            'enable' => CL::class . '::enableCommand',
            'disable' => CL::class . '::disableCommand',
            'uninstall' => CL::class . '::uninstallCommand',
            'collect' => CL::class . '::collectCommand',
            'build-assets' => CL::class . '::buildAssetsCommand'
        );

        foreach ($commands as $name => $callback) {
            $command->register($name, $callback);
        }
    }
775505
protected function _commandEnable($command)
    {
        $entity = $this->getController()->getItem();
        $label = AnTranslator::_('LIB-AN-ACTION-'.strtoupper($entity->enabled ? 'disable' : 'enable'));

        $command->append(array('label' => $label))
        ->href($entity->getURL().'&action='.($entity->enabled ? 'disable' : 'enable'))
        ->setAttribute('data-trigger', 'Submit');
    }
1257621
public function dryRunCommand(CommandInterface $command)
    {
        $this->newLine();
        $this->write(' // Dry-run: ' . $command->getName());
        $this->newLine(3);
    }
350215
protected function setCommand($command)
    {
        $this->command = $command;

        if (!is_null($this->loader)) {
            $this->loader->setCommand($this->command);
        }
    }
263931
public function handle(CommandInterface $command)
    {
        $object = $command->getParameter('data');

        if ($command->hasParameter('class')) {
            $class = $command->getParameter('class');
            if (!($object instanceof $class)) {
                return CommandResult::error('invalid_instance');
            }
        }

        try {
            $this->objectManager->flush();
        } catch (ForeignKeyConstraintViolationException $e) {
            return CommandResult::error('constraint_violation');
        }
    }
304637
public function disableTopOfFormBackup()
    {
        $command = new Command\Stored\DisableTopOfFormBackupCommand();
        $this->getComposite()->addCommand($command);
        return $this;
    }
535309
public function detach(\Zend_EventManager_EventCollection $events)
    {
        foreach($this->listeners as $index => $listener) {
            if($events->detach($listener)) {
                unset($this->listeners[$index]);
            }
        }
    }
32617
public function register(CommandInterface $command)
    {
        /*
         * Gets the name of the command
         * @var string
         */
        $name = $command->getCommand();

        /*
         * Check if the command isn't already registered
         * otherwise throw an exception
         */
        if (array_key_exists($name, $this->commands)) {
            throw new CommandException("Command with name '$name' already registered");
        }

        /*
         * Adds the command to the array
         */
        $this->commands[$name] = $command;
    }
1133864
public function off(string $event): void
    {
        if ($this->hasEvent($event)) {
            unset(self::$events[$event], self::$eventHandlers[$event]);
        }
    }
478183
public function resolveCommands($commands)
    {
        return parent::resolveCommands(array_filter($commands, function ($command) {
            return is_subclass_of($command, WebCommand::class);
        }));
    }
714048
protected function setGroups(CommandInterface $command, array $definition)
    {
        if (isset($definition[static::CONFIG_GROUPS])) {
            $command->setGroups($definition[static::CONFIG_GROUPS]);
        }
    }
1231842
def toggle_shells(command, enable):
    """"""
    selection = list(selected_shells(command))
    if command and command != '*' and selection:
        for i in selection:
            if i.state != remote_dispatcher.STATE_DEAD and i.enabled != enable:
                break
        else:
            toggle_shells('*', not enable)

    for i in selection:
        if i.state != remote_dispatcher.STATE_DEAD:
            i.set_enabled(enable)
625996
public void registerCommands(final List<Class<Command>> commands) {
        setScope(ConfigScope.ClasspathScan.getType());
        for (Class<Command> cmd : commands) {
            register(ConfigItem.Command, cmd);
        }
        closeScope();
    }
594760
public function resolveCommands($commands)
    	{
    		$commands = Arrays::isArray($commands) ? $commands : func_get_args();

    		foreach ($commands as $command) {
    			$this->resolve($command);
    		}
    	}
1359322
public function enable(Command $command)
    {
        $command->call('down');

        foreach ($this->scripts as $script) {
            try {
                $this->app->make($script)->fire($command);
            } catch (\Exception $e) {
                $command->error($e->getMessage());

                return false;
            }
        }

        $command->call('up');

        return true;
    }