src/Controller/ManageController.php
public function templateAction()
    {
        try {
            $jobEntity = $this->initializeJob()->get($this->params());
            $jobEntity->setTemplate($this->params('template', 'default'));
            $this->repositoryService->store($jobEntity);
            $this->notification()->success(/* @translate*/ 'Template changed');
        } catch (\Exception $e) {
            $this->notification()->danger(/* @translate */ 'Template not changed');
        }

        return new JsonModel(array());
    }
public function templateAction()
    {
        try {
            $jobEntity = $this->initializeJob()->get($this->params());
            $jobEntity->setTemplate($this->params('template', 'default'));
            $this->repositoryService->store($jobEntity);
            $this->notification()->success(/* @translate*/ 'Template changed');
        } catch (\Exception $e) {
            $this->notification()->danger(/* @translate */ 'Template not changed');
        }

        return new JsonModel(array());
    }
public function templateAction ( ) { try { $ jobEntity = $ this -> initializeJob ( ) -> get ( $ this -> params ( ) ) ; $ jobEntity -> setTemplate ( $ this -> params ( 'template' , 'default' ) ) ; $ this -> repositoryService -> store ( $ jobEntity ) ; $ this -> notification ( ) -> success ( /* @translate*/ 'Template changed' ) ; } catch ( \ Exception $ e ) { $ this -> notification ( ) -> danger ( /* @translate */ 'Template not changed' ) ; } return new JsonModel ( array ( ) ) ; }
Assign a template to a job posting

@return JsonModel
Assign a template to a job posting