Gets an array of commands that have been configured to be disabled.

@return array
A flat array of disabled commands.
4938
protected function getDisabledCommands() {
    $disabled_commands_config = $this->getConfigValue('disable-targets');
    if ($disabled_commands_config) {
      $disabled_commands = ArrayManipulator::flattenMultidimensionalArray($disabled_commands_config, ':');
      return $disabled_commands;
    }
    return [];
  }
214132
protected function getPhpMigCommands()
    {
        return [
            new Command\CheckCommand(),
            new Command\DownCommand(),
            new Command\GenerateCommand(),
            new Command\MigrateCommand(),
            new Command\RedoCommand(),
            new Command\RollbackCommand(),
            new Command\StatusCommand(),
            new Command\UpCommand(),
        ];
    }
176738
protected function get_js_commands()
    {
        $out = '';

        foreach ($this->commands as $i => $args) {
            $method = array_shift($args);
            foreach ($args as $i => $arg) {
                $args[$i] = self::json_serialize($arg, $this->devel_mode, false);
            }

            $out .= sprintf(
                "this.%s(%s);\n",
                preg_replace('/^parent\./', '', $method),
                implode(',', $args)
            );
        }

        return $out;
    }
802155
public function all() {
    $commands = [
      'tests:composer:validate',
      'tests:php:lint',
      'tests:phpcs:sniff:all',
      'tests:yaml:lint:all',
      'tests:twig:lint:all',
    ];
    // To enable this command, set validate.acsf to TRUE in blt.yml.
    if ($this->getConfigValue('validate.acsf') == TRUE) {
      $commands[] = 'tests:acsf:validate';
    }

    $status_code = $this->invokeCommands($commands);
    return $status_code;
  }
854368
public function getScheduledCommands()
    {
        $scheduledCommands = [];
        foreach ($this->console->all() as $command) {
            if ($command instanceof ScheduledCommandInterface) {
                $scheduledCommands[] = $command;
            }
        }

        return $scheduledCommands;
    }
1203838
public function getCommandOptions()
    {
        $consoleOptions = array();
        foreach ($this->requests as $name => $request) {
            if ($request->isAvailableAsCommandOption()) {
                $consoleOptions[$name] = $request->convertToCommandOption();
            }
        }

        return $consoleOptions;
    }
1050675
public function getCommands()
    {
        foreach ($this->commands as $command) {
            if ($command instanceof \Traversable) {
                //Nested commands
                yield from $command;
            }

            yield $command;
        }
    }
325746
public function commandBar(): array
    {
        return [

            Link::name(__('Settings'))
                ->icon('icon-open')
                ->group([
                    Link::name(__('Login as user'))
                        ->icon('icon-login')
                        ->method('switchUserStart'),

                    Link::name(__('Change Password'))
                        ->icon('icon-lock-open')
                        ->title(__('Change Password'))
                        ->method('changePassword')
                        ->modal('password'),
                ]),

            Link::name(__('Save'))
                ->icon('icon-check')
                ->method('save'),

            Link::name(__('Remove'))
                ->icon('icon-trash')
                ->method('remove'),
        ];
    }
1284071
public static function commands(){
       $results = [];
       foreach(static::$commands as $name => $cmd){
          $results[] = [
            'name'        => $name,
            'params'      => preg_replace('/:(\w+)/','[$1]',implode(' ',$cmd[0])),
            'description' => $cmd[2],
          ];
       }
       return $results;
    }
17681
protected function listAdminCommands()
    {
        $commands = collect(Artisan::all())->mapWithKeys(function ($command, $key) {
            if (Str::startsWith($key, 'admin:')) {
                return [$key => $command];
            }

            return [];
        })->toArray();

        $width = $this->getColumnWidth($commands);

        /** @var Command $command */
        foreach ($commands as $command) {
            $this->line(sprintf(" %-{$width}s %s", $command->getName(), $command->getDescription()));
        }
    }
136927
public static function get_enabled_plugins() {
        $plugins = core_plugin_manager::instance()->get_installed_plugins('qbehaviour');
        if (!$plugins) {
            return array();
        }
        if ($disabled = get_config('question', 'disabledbehaviours')) {
            $disabled = explode(',', $disabled);
        } else {
            $disabled = array();
        }

        $enabled = array();
        foreach ($plugins as $plugin => $version) {
            if (in_array($plugin, $disabled)) {
                continue;
            }
            $enabled[$plugin] = $plugin;
        }

        return $enabled;
    }
27077
protected function getDaemonOptions()
    {
        return [
            ['daemon', null, InputOption::VALUE_NONE,     'Run the command in daemon mode'],
            ['sleep',  null, InputOption::VALUE_OPTIONAL, 'Number of seconds to sleep when no job is available', 3],
            ['memory', null, InputOption::VALUE_OPTIONAL, 'The memory limit in megabytes', 128],
        ];
    }
1152898
public function getEnabledExtensions()
    {
        $enabled = [];
        $extensions = $this->getExtensions();

        foreach ($this->getEnabled() as $id) {
            if (isset($extensions[$id])) {
                $enabled[$id] = $extensions[$id];
            }
        }

        return $enabled;
    }
885675
public function getCommands()
    {
        $commands = $this->getModuleCommands($this->app);
        sort($commands);
        return array_unique($commands);
    }
720467
public function getInvertedCommands()
    {
        if (null === $this->getCommands()) {
            return [];
        }

        $invCommands = [];
        $supportedCommands = [
            'createTable', 'renameTable', 'addColumn',
            'renameColumn', 'addIndex', 'addForeignKey',
        ];
        foreach (array_reverse($this->getCommands()) as $command) {
            if (!in_array($command['name'], $supportedCommands)) {
                throw new IrreversibleMigrationException(sprintf(
                    'Cannot reverse a "%s" command',
                    $command['name']
                ));
            }
            $invertMethod = 'invert' . ucfirst($command['name']);
            $invertedCommand = $this->$invertMethod($command['arguments']);
            $invCommands[] = [
                'name' => $invertedCommand['name'],
                'arguments' => $invertedCommand['arguments'],
            ];
        }

        return $invCommands;
    }
654464
public function getHandlers()
    {
        $commands = &gplcart_static('module.file_manager.handlers');

        if (isset($commands)) {
            return $commands;
        }

        $commands = (array) gplcart_config_get(__DIR__ . '/../config/commands.php');

        foreach ($commands as $id => &$command) {
            $command['command_id'] = $id;
        }

        $this->hook->attach('module.file_manager.handlers', $commands, $this);
        return $commands;
    }
682729
static public function getAppCommands()
    {
        \Yii::beginProfile('Scan all controllers');

        $commands = static::getModuleCommands(\Yii::$app);
        sort($commands);
        $result = array_unique($commands);

        \Yii::endProfile('Scan all controllers');

        return $result;
    }