class Setup in DRD Agent 8.3
Same name in this branch
- 8.3 src/Setup.php \Drupal\drd_agent\Setup
- 8.3 src/Command/Setup.php \Drupal\drd_agent\Command\Setup
Same name and namespace in other branches
- 4.0.x src/Command/Setup.php \Drupal\drd_agent\Command\Setup
Class Setup.
@package Drupal\drd_agent
Hierarchy
- class \Drupal\drd_agent\Command\Setup extends \Symfony\Component\Console\Command\Command uses \Drupal\Console\Core\Command\Shared\CommandTrait
Expanded class hierarchy of Setup
1 string reference to 'Setup'
1 service uses Setup
File
- src/
Command/ Setup.php, line 18
Namespace
Drupal\drd_agent\CommandView source
class Setup extends Command {
use CommandTrait;
/**
* @var \Drupal\drd_agent\Setup
*/
protected $setupService;
/**
* Setup constructor.
*
* @param \Drupal\drd_agent\Setup $setup_service
*/
public function __construct(SetupService $setup_service) {
parent::__construct();
$this->setupService = $setup_service;
}
/**
* {@inheritdoc}
*/
protected function configure() {
parent::configure();
$this
->setName('drd:agent:setup')
->setDescription($this
->trans('Initially setup the site for the DRD Agent, only used internally by the setup process.'))
->addArgument('token', InputArgument::REQUIRED, $this
->trans('Base64 and json encoded array of all variables required such that DRD can communicate with this domain in the future'));
}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output) {
$_SESSION['drd_agent_authorization_values'] = $input
->getArgument('token');
$this->setupService
->execute();
unset($_SESSION['drd_agent_authorization_values']);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Setup:: |
protected | property | ||
Setup:: |
protected | function | Configures the current command. | |
Setup:: |
protected | function | Executes the current command. | |
Setup:: |
public | function | Setup constructor. |