src/Controller/ManageController.php
public function deactivateAction()
    {
        $user           = $this->auth->getUser();

        $jobEntity = $this->initializeJob()->get($this->params());

        try {
            $jobEntity->changeStatus(Status::INACTIVE, sprintf(/*@translate*/ "Job was deactivated by %s", $user->getInfo()->getDisplayName()));
            $this->notification()->success(/*@translate*/ 'Job has been deactivated');
        } catch (\Exception $e) {
            $this->notification()->danger(/*@translate*/ 'Job could not be deactivated');
        }
        exit;
        return $this->save(array('page' => 2));
    }
public function deactivateAction()
    {
        $user           = $this->auth->getUser();

        $jobEntity = $this->initializeJob()->get($this->params());

        try {
            $jobEntity->changeStatus(Status::INACTIVE, sprintf(/*@translate*/ "Job was deactivated by %s", $user->getInfo()->getDisplayName()));
            $this->notification()->success(/*@translate*/ 'Job has been deactivated');
        } catch (\Exception $e) {
            $this->notification()->danger(/*@translate*/ 'Job could not be deactivated');
        }
        exit;
        return $this->save(array('page' => 2));
    }
public function deactivateAction ( ) { $ user = $ this -> auth -> getUser ( ) ; $ jobEntity = $ this -> initializeJob ( ) -> get ( $ this -> params ( ) ) ; try { $ jobEntity -> changeStatus ( Status :: INACTIVE , sprintf ( /*@translate*/ "Job was deactivated by %s" , $ user -> getInfo ( ) -> getDisplayName ( ) ) ) ; $ this -> notification ( ) -> success ( /*@translate*/ 'Job has been deactivated' ) ; } catch ( \ Exception $ e ) { $ this -> notification ( ) -> danger ( /*@translate*/ 'Job could not be deactivated' ) ; } exit ; return $ this -> save ( array ( 'page' => 2 ) ) ; }
Deactivate a job posting

@return null|ViewModel
Deactivate a job posting