You are here

class ScheduledTransitionsCommands in Scheduled Transitions 2.x

Same name and namespace in other branches
  1. 8 src/Commands/ScheduledTransitionsCommands.php \Drupal\scheduled_transitions\Commands\ScheduledTransitionsCommands

Drush commandfile for Scheduled Transitions.

Hierarchy

Expanded class hierarchy of ScheduledTransitionsCommands

1 string reference to 'ScheduledTransitionsCommands'
drush.services.yml in ./drush.services.yml
drush.services.yml
1 service uses ScheduledTransitionsCommands
scheduled_transitions.commands in ./drush.services.yml
Drupal\scheduled_transitions\Commands\ScheduledTransitionsCommands

File

src/Commands/ScheduledTransitionsCommands.php, line 13

Namespace

Drupal\scheduled_transitions\Commands
View source
class ScheduledTransitionsCommands extends DrushCommands {

  /**
   * Job runner for Scheduled Transitions.
   *
   * @var \Drupal\scheduled_transitions\ScheduledTransitionsJobsInterface
   */
  protected $jobs;

  /**
   * Constructs a new ScheduledTransitionsCommands.
   *
   * @param \Drupal\scheduled_transitions\ScheduledTransitionsJobsInterface $jobs
   *   Job runner for Scheduled Transitions.
   */
  public function __construct(ScheduledTransitionsJobsInterface $jobs) {
    $this->jobs = $jobs;
  }

  /**
   * Fills queue with crawler jobs.
   *
   * @command scheduled-transitions:queue-jobs
   * @aliases sctr-jobs
   */
  public function crawlJobCreator() {
    $this->jobs
      ->jobCreator();
    $this
      ->logger()
      ->success(dt('Scheduled transitions queued.'));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ScheduledTransitionsCommands::$jobs protected property Job runner for Scheduled Transitions.
ScheduledTransitionsCommands::crawlJobCreator public function Fills queue with crawler jobs.
ScheduledTransitionsCommands::__construct public function Constructs a new ScheduledTransitionsCommands.