src/Controller/ToolUserController.php
public function renderToolUserAction()
    {
        $translator = $this->getServiceLocator()->get('translator');
        $melisKey = $this->params()->fromRoute('melisKey', '');
        $noAccessPrompt = 'tr_meliscore_no_access_to_tool';
        $hasAccess = $this->hasAccess($this::TOOL_KEY);

        if(!$hasAccess) {
            $noAccessPrompt = $translator->translate('tr_tool_no_access');
        }

        $melisKey = $this->params()->fromRoute('melisKey', '');
        $melisTool = $this->getServiceLocator()->get('MelisCoreTool');
        $melisTool->setMelisToolKey('meliscore', $this::TOOL_KEY);

        $view = new ViewModel();
        $view->title = $melisTool->getTitle();
        $view->melisKey = $melisKey;
        $view->hasAccess = $hasAccess;


        return $view;
    }
public function renderToolUserAction()
    {
        $translator = $this->getServiceLocator()->get('translator');
        $melisKey = $this->params()->fromRoute('melisKey', '');
        $noAccessPrompt = 'tr_meliscore_no_access_to_tool';
        $hasAccess = $this->hasAccess($this::TOOL_KEY);

        if(!$hasAccess) {
            $noAccessPrompt = $translator->translate('tr_tool_no_access');
        }

        $melisKey = $this->params()->fromRoute('melisKey', '');
        $melisTool = $this->getServiceLocator()->get('MelisCoreTool');
        $melisTool->setMelisToolKey('meliscore', $this::TOOL_KEY);

        $view = new ViewModel();
        $view->title = $melisTool->getTitle();
        $view->melisKey = $melisKey;
        $view->hasAccess = $hasAccess;


        return $view;
    }
public function renderToolUserAction ( ) { $ translator = $ this -> getServiceLocator ( ) -> get ( 'translator' ) ; $ melisKey = $ this -> params ( ) -> fromRoute ( 'melisKey' , '' ) ; $ noAccessPrompt = 'tr_meliscore_no_access_to_tool' ; $ hasAccess = $ this -> hasAccess ( $ this :: TOOL_KEY ) ; if ( ! $ hasAccess ) { $ noAccessPrompt = $ translator -> translate ( 'tr_tool_no_access' ) ; } $ melisKey = $ this -> params ( ) -> fromRoute ( 'melisKey' , '' ) ; $ melisTool = $ this -> getServiceLocator ( ) -> get ( 'MelisCoreTool' ) ; $ melisTool -> setMelisToolKey ( 'meliscore' , $ this :: TOOL_KEY ) ; $ view = new ViewModel ( ) ; $ view -> title = $ melisTool -> getTitle ( ) ; $ view -> melisKey = $ melisKey ; $ view -> hasAccess = $ hasAccess ; return $ view ; }
Renders the main container of the tool
@return \Zend\View\Model\ViewModel
Renders the main container of the tool