Drupal 8

Программно выполнить Drush команды

Пример программного вызова Drush команд:

<?php

namespace Drupal\example\Commands;

use Consolidation\SiteAlias\SiteAliasManagerAwareInterface;
use Consolidation\SiteAlias\SiteAliasManagerAwareTrait;
use Drush\Drush;

/**
 * Drush command to install and configure website using "minimal" profile.
 */
class ExampeCommands extends DrushCommands implements SiteAliasManagerAwareInterface {

  use SiteAliasManagerAwareTrait;

  /**
   * Install and configure Drupal.
   *
   * @command example:site:install
   *
   * @aliases...
Benya