Back to TasksStateCommand class

Method configure

protected void
configure
()
Configure the command.
Returns
  • void
Since
  • 4.1.0

Method configure - Source code

/**
 * Configure the command.
 *
 * @return  void
 *
 * @since   4.1.0
 */
protected function configure() : void
{
    $this->addOption('id', 'i', InputOption::VALUE_REQUIRED, 'The id of the task to change state.');
    $this->addOption('state', 's', InputOption::VALUE_REQUIRED, 'The new state of the task, can be 1/enable, 0/disable, or -2/trash.');
    $help = "<info>%command.name%</info> changes the state of a task.\n\t\t\nUsage: <info>php %command.full_name%</info>";
    $this->setDescription('Enable, disable or trash a scheduled task');
    $this->setHelp($help);
}