public function __construct() { global $DB; parent::__construct('context', 'info'); $this->addArgument('contextid'); //$this->addOption('t|test', 'option with no value'); //$this->addOption('o|option:', 'option with value and default', 'default'); }