class BrightcoveCommands in Brightcove Video Connect 8
Same name and namespace in other branches
- 8.2 src/Commands/BrightcoveCommands.php \Drupal\brightcove\Commands\BrightcoveCommands
- 3.x src/Commands/BrightcoveCommands.php \Drupal\brightcove\Commands\BrightcoveCommands
Drush 9.x commands for Brightcove Video Connect.
Hierarchy
- class \Drupal\brightcove\Commands\BrightcoveCommands extends \Drush\Commands\DrushCommands
Expanded class hierarchy of BrightcoveCommands
1 string reference to 'BrightcoveCommands'
1 service uses BrightcoveCommands
File
- src/
Commands/ BrightcoveCommands.php, line 13
Namespace
Drupal\brightcove\CommandsView source
class BrightcoveCommands extends DrushCommands {
/**
* The queue service.
*
* @var \Drupal\Core\Queue\QueueFactory
*/
protected $queueFactory;
/**
* BrightcoveCommands constructor.
*
* @param \Drupal\Core\Queue\QueueFactory $queueFactory
* The queue service.
*/
public function __construct(QueueFactory $queueFactory) {
$this->queueFactory = $queueFactory;
}
/**
* Initiates a Brightcove-to-Drupal sync by adding API clients to the queue.
*
* @command brightcove:sync-all
* @aliases brightcove-sync-all,bcsa
*/
public function syncAll() {
$this
->output()
->writeln('Initiating Brightcove-to-Drupal sync...');
try {
BrightcoveUtil::runStatusQueues('sync', $this->queueFactory);
drush_backend_batch_process();
$this
->logger()
->notice('Sync complete.');
} catch (BrightcoveUtilException $e) {
$this
->logger()
->error($e
->getMessage());
watchdog_exception('brightcove', $e);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BrightcoveCommands:: |
protected | property | The queue service. | |
BrightcoveCommands:: |
public | function | Initiates a Brightcove-to-Drupal sync by adding API clients to the queue. | |
BrightcoveCommands:: |
public | function | BrightcoveCommands constructor. |