class ScheduledPublishCommands in Scheduled Publish 8.2
Same name and namespace in other branches
- 8.3 src/Commands/ScheduledPublishCommands.php \Drupal\scheduled_publish\Commands\ScheduledPublishCommands
Class ScheduledPublishCommands
@package Drupal\scheduled_publish\Commands
Hierarchy
- class \Drupal\scheduled_publish\Commands\ScheduledPublishCommands extends \Drush\Commands\DrushCommands
Expanded class hierarchy of ScheduledPublishCommands
1 string reference to 'ScheduledPublishCommands'
1 service uses ScheduledPublishCommands
File
- src/
Commands/ ScheduledPublishCommands.php, line 13
Namespace
Drupal\scheduled_publish\CommandsView source
class ScheduledPublishCommands extends DrushCommands {
/**
* @var \Drupal\scheduled_publish\Service\ScheduledPublishCron
*/
private $publishCron;
/**
* ScheduledPublishCommands constructor.
*
* @param \Drupal\scheduled_publish\Service\ScheduledPublishCron $publishCron
*/
public function __construct(ScheduledPublishCron $publishCron) {
parent::__construct();
$this->publishCron = $publishCron;
}
/**
* @command scheduled_publish:doUpdate
* @aliases schp
*/
public function doUpdate() {
$this->publishCron
->doUpdate();
$this
->logger()
->notice(t('Scheduled publish updates done.'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ScheduledPublishCommands:: |
private | property | ||
ScheduledPublishCommands:: |
public | function | @command scheduled_publish:doUpdate @aliases schp | |
ScheduledPublishCommands:: |
public | function | ScheduledPublishCommands constructor. |