class VarbaseUpdateHelperCommands in Varbase Core 8.7
Same name and namespace in other branches
- 8.8 modules/varbase_update_helper/src/Commands/VarbaseUpdateHelperCommands.php \Drupal\varbase_update_helper\Commands\VarbaseUpdateHelperCommands
- 8.6 modules/varbase_update_helper/src/Commands/VarbaseUpdateHelperCommands.php \Drupal\varbase_update_helper\Commands\VarbaseUpdateHelperCommands
- 9.0.x modules/varbase_update_helper/src/Commands/VarbaseUpdateHelperCommands.php \Drupal\varbase_update_helper\Commands\VarbaseUpdateHelperCommands
Class VarbaseUpdateHelperCommands.
Define drush commands for varbase_update_helper module.
@package Drupal\varbase_update_helper\Commands
Hierarchy
- class \Drupal\varbase_update_helper\Commands\VarbaseUpdateHelperCommands extends \Drush\Commands\DrushCommands
Expanded class hierarchy of VarbaseUpdateHelperCommands
1 string reference to 'VarbaseUpdateHelperCommands'
- drush.services.yml in modules/
varbase_update_helper/ drush.services.yml - modules/varbase_update_helper/drush.services.yml
1 service uses VarbaseUpdateHelperCommands
- varbase_update_helper.commands in modules/
varbase_update_helper/ drush.services.yml - Drupal\varbase_update_helper\Commands\VarbaseUpdateHelperCommands
File
- modules/
varbase_update_helper/ src/ Commands/ VarbaseUpdateHelperCommands.php, line 16
Namespace
Drupal\varbase_update_helper\CommandsView source
class VarbaseUpdateHelperCommands extends DrushCommands {
/**
* Command helper object (inspired by search API module)
*
* @var \Drupal\varbase_core\Utility\CommandHelper
*/
protected $commandHelper;
/**
* VarbaseUpdateHelperCommands constructor.
*/
public function __construct() {
$this->commandHelper = new CommandHelper();
}
/**
* {@inheritdoc}
*/
public function setLogger(LoggerInterface $logger) {
parent::setLogger($logger);
$this->commandHelper
->setLogger($logger);
}
/**
* Applying an (optional) update hook (function) from module install file.
*
* Apply Varbase updates by invoking the related update hooks.
*
* @param string $module
* Module name.
* @param string $update_hook
* Update hook.
* @param array $options
* Options.
*
* @option force
*
* @command varbase_update_helper:varbase-apply-update
* @aliases varbase-up
*/
public function varbaseApplyUpdate($module = '', $update_hook = '', array $options = [
'force' => FALSE,
]) {
$force = $options['force'];
$this->commandHelper
->varbaseApplyUpdate($module, $update_hook, $force);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
VarbaseUpdateHelperCommands:: |
protected | property | Command helper object (inspired by search API module) | |
VarbaseUpdateHelperCommands:: |
public | function | ||
VarbaseUpdateHelperCommands:: |
public | function | Applying an (optional) update hook (function) from module install file. | |
VarbaseUpdateHelperCommands:: |
public | function | VarbaseUpdateHelperCommands constructor. |