public function setJob($job_model)
    {
        if ($this->isCanceledJob($job_model)) {
            return null;
        }

        $job_id = $this->getQuery('job_id');

        if (empty($job_id)) {
            return null;
        }

        $job = $job_model->get($job_id);

        if (empty($job['status'])) {
            return null;
        }

        $this->setJsSettings('job', $job);

        if ($this->getQuery('process_job') === $job['id'] && $this->isAjax()) {
            $this->outputJson($job_model->process($job));
        }

        return null;
    }
public function setJob($job_model)
    {
        if ($this->isCanceledJob($job_model)) {
            return null;
        }

        $job_id = $this->getQuery('job_id');

        if (empty($job_id)) {
            return null;
        }

        $job = $job_model->get($job_id);

        if (empty($job['status'])) {
            return null;
        }

        $this->setJsSettings('job', $job);

        if ($this->getQuery('process_job') === $job['id'] && $this->isAjax()) {
            $this->outputJson($job_model->process($job));
        }

        return null;
    }
public function setJob ( $ job_model ) { if ( $ this -> isCanceledJob ( $ job_model ) ) { return null ; } $ job_id = $ this -> getQuery ( 'job_id' ) ; if ( empty ( $ job_id ) ) { return null ; } $ job = $ job_model -> get ( $ job_id ) ; if ( empty ( $ job [ 'status' ] ) ) { return null ; } $ this -> setJsSettings ( 'job' , $ job ) ; if ( $ this -> getQuery ( 'process_job' ) === $ job [ 'id' ] && $ this -> isAjax ( ) ) { $ this -> outputJson ( $ job_model -> process ( $ job ) ) ; } return null ; }
Processes the current job
@param \gplcart\core\models\Job $job_model
@return null
Processes the current job