public function WebformCommandsBase::__construct in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Commands/WebformCommandsBase.php \Drupal\webform\Commands\WebformCommandsBase::__construct()
Constructs a WebformCommandsBase object.
Parameters
\Drupal\webform\Commands\WebformCliServiceInterface $cli_service: The webform CLI service.
File
- src/
Commands/ WebformCommandsBase.php, line 30
Class
- WebformCommandsBase
- Base class for Webform commands for Drush 9.x.
Namespace
Drupal\webform\CommandsCode
public function __construct(WebformCliServiceInterface $cli_service) {
$this->cliService = $cli_service;
// Injecting the WebformCommand into the CLI service so that calls to
// drush functions can be delegatef back the below methods.
// @see \Drupal\webform\Commands\WebformCliService::__call
$this->cliService
->setCommand($this);
}