class Drush in DRD Agent 4.0.x
Same name and namespace in other branches
- 8.3 src/Commands/Drush.php \Drupal\drd_agent\Commands\Drush
Class Base.
@package Drupal\drd_agent
Hierarchy
- class \Drupal\drd_agent\Commands\Drush extends \Drush\Commands\DrushCommands
Expanded class hierarchy of Drush
1 string reference to 'Drush'
1 service uses Drush
File
- src/
Commands/ Drush.php, line 13
Namespace
Drupal\drd_agent\CommandsView source
class Drush extends DrushCommands {
/**
* @var \Drupal\drd_agent\Setup
*/
protected $setupService;
/**
* Drush constructor.
*
* @param \Drupal\drd_agent\Setup $setup_service
*/
public function __construct(Setup $setup_service) {
parent::__construct();
$this->setupService = $setup_service;
}
/**
* Configure this domain for communication with a DRD instance.
*
* @param string $token
* Base64 and json encoded array of all variables required such that
* DRD can communicate with this domain in the future.
*
* @command drd:agent:setup
* @aliases drd-agent-setup
*/
public function setup($token) {
$_SESSION['drd_agent_authorization_values'] = $token;
$this->setupService
->execute();
unset($_SESSION['drd_agent_authorization_values']);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Drush:: |
protected | property | ||
Drush:: |
public | function | Configure this domain for communication with a DRD instance. | |
Drush:: |
public | function | Drush constructor. |