public function Setup::execute in DRD Agent 8.3
Same name in this branch
- 8.3 src/Setup.php \Drupal\drd_agent\Setup::execute()
- 8.3 src/Command/Setup.php \Drupal\drd_agent\Command\Setup::execute()
Same name and namespace in other branches
- 4.0.x src/Setup.php \Drupal\drd_agent\Setup::execute()
Perform the configuration with the data from the token.
Return value
array The configuration data for this domain.
File
- src/
Setup.php, line 73
Class
- Setup
- Class Setup.
Namespace
Drupal\drd_agentCode
public function execute() : array {
$this
->checkForRemoteSetupToken();
$config = $this->configFactory
->getEditable('drd_agent.settings');
$authorised = $config
->get('authorised') ?? [];
$this->values['timestamp'] = $this->time
->getRequestTime();
$this->values['ip'] = $this->request
->getClientIp();
$authorised[$this->values['uuid']] = $this->values;
$config
->set('authorised', $authorised)
->save(TRUE);
return $this->values;
}