src/Filter/ViewModelTemplateFilterAbstract.php
protected function setApplyData()
    {
        if (!isset($this->job)) {
            throw new \InvalidArgumentException('cannot create a viewModel for Templates without a $job');
        }
        
        $data = [
            'applyId' => $this->job->getApplyId(),
            'uri' => null,
            'oneClickProfiles' => []
        ];
        $atsMode = $this->job->getAtsMode();
        
        if ($atsMode->isIntern() || $atsMode->isEmail()) {
            $data['uri'] = $this->urlPlugin->fromRoute('lang/apply', ['applyId' => $this->job->getApplyId()], ['force_canonical' => true]);
        } elseif ($atsMode->isUri()) {
            $data['uri'] = $atsMode->getUri();
        }
        
        if ($atsMode->isIntern() && $atsMode->getOneClickApply()) {
            $data['oneClickProfiles'] = $atsMode->getOneClickApplyProfiles();
        }
        
        $this->container['applyData'] = $data;
        
        return $this;
    }
protected function setApplyData()
    {
        if (!isset($this->job)) {
            throw new \InvalidArgumentException('cannot create a viewModel for Templates without a $job');
        }
        
        $data = [
            'applyId' => $this->job->getApplyId(),
            'uri' => null,
            'oneClickProfiles' => []
        ];
        $atsMode = $this->job->getAtsMode();
        
        if ($atsMode->isIntern() || $atsMode->isEmail()) {
            $data['uri'] = $this->urlPlugin->fromRoute('lang/apply', ['applyId' => $this->job->getApplyId()], ['force_canonical' => true]);
        } elseif ($atsMode->isUri()) {
            $data['uri'] = $atsMode->getUri();
        }
        
        if ($atsMode->isIntern() && $atsMode->getOneClickApply()) {
            $data['oneClickProfiles'] = $atsMode->getOneClickApplyProfiles();
        }
        
        $this->container['applyData'] = $data;
        
        return $this;
    }
protected function setApplyData ( ) { if ( ! isset ( $ this -> job ) ) { throw new \ InvalidArgumentException ( 'cannot create a viewModel for Templates without a $job' ) ; } $ data = [ 'applyId' => $ this -> job -> getApplyId ( ) , 'uri' => null , 'oneClickProfiles' => [ ] ] ; $ atsMode = $ this -> job -> getAtsMode ( ) ; if ( $ atsMode -> isIntern ( ) || $ atsMode -> isEmail ( ) ) { $ data [ 'uri' ] = $ this -> urlPlugin -> fromRoute ( 'lang/apply' , [ 'applyId' => $ this -> job -> getApplyId ( ) ] , [ 'force_canonical' => true ] ) ; } elseif ( $ atsMode -> isUri ( ) ) { $ data [ 'uri' ] = $ atsMode -> getUri ( ) ; } if ( $ atsMode -> isIntern ( ) && $ atsMode -> getOneClickApply ( ) ) { $ data [ 'oneClickProfiles' ] = $ atsMode -> getOneClickApplyProfiles ( ) ; } $ this -> container [ 'applyData' ] = $ data ; return $ this ; }
Set the apply buttons of the job posting

@return ViewModelTemplateFilterAbstract
@throws \InvalidArgumentException
Set the apply buttons of the job posting