How am I able to get or set additional properties on a Task model inside a plugin.
Eventually I would like to influence the Totalsteps
of a task.
$task = craft()->tasks->createTask('Reroute', 'Importing routes', array(
'files' => $files,
'steps' => count($files)
));
class RerouteTask extends BaseTask
{
public function getTotalSteps()
{
return $this->getSettings()->steps;
}
Is resulting in Craft\TaskModel.steps is not defined
.
What am I missing here?