Platformsh\Cli\Local\Toolstack\Drupal::getDrushFlags PHP Method

getDrushFlags() protected method

Set up options to pass to the drush commands.
protected getDrushFlags ( ) : array
return array
    protected function getDrushFlags()
    {
        $drushFlags = ['--yes'];
        $verbosity = $this->output->getVerbosity();
        if ($verbosity === OutputInterface::VERBOSITY_QUIET) {
            $drushFlags[] = '--quiet';
        } elseif ($verbosity === OutputInterface::VERBOSITY_DEBUG) {
            $drushFlags[] = '--debug';
        } elseif ($verbosity >= OutputInterface::VERBOSITY_VERY_VERBOSE) {
            $drushFlags[] = '--verbose';
        }
        if (!empty($this->settings['working-copy'])) {
            $drushFlags[] = '--working-copy';
        }
        if (!empty($this->settings['no-cache'])) {
            $drushFlags[] = '--no-cache';
        } else {
            $drushFlags[] = '--cache-duration-releasexml=300';
        }
        if (!empty($this->settings['concurrency'])) {
            $drushFlags[] = '--concurrency=' . $this->settings['concurrency'];
        }
        return $drushFlags;
    }