Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 10273 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 10273 Rev 10423
Línea 73... Línea 73...
73
    {
73
    {
Línea 74... Línea 74...
74
       
74
       
75
        $currentUserPlugin = $this->plugin('currentUserPlugin');
75
        $currentUserPlugin = $this->plugin('currentUserPlugin');
76
        $currentUser = $currentUserPlugin->getUser();
76
        $currentUser = $currentUserPlugin->getUser();
-
 
77
        $currentCompany = $currentUserPlugin->getCompany();
Línea 77... Línea 78...
77
        $currentCompany = $currentUserPlugin->getCompany();
78
        $id =  $this->params()->fromRoute('id');
Línea -... Línea 79...
-
 
79
     
-
 
80
        $request = $this->getRequest();
-
 
81
 
-
 
82
        if(!$id) {
-
 
83
            $data = [
-
 
84
                'success'   => false,
-
 
85
                'data'   => 'ERROR_INVALID_PARAMETER'
-
 
86
            ];
Línea -... Línea 87...
-
 
87
            
-
 
88
            return new JsonModel($data);
78
     
89
        }
-
 
90
      
-
 
91
        $questionMapper = MyTrainerQuestionMapper::getInstance($this->adapter);
-
 
92
        $question = $questionMapper->fetchOneByUuid($id);
-
 
93
       
-
 
94
        if (!$question) {
-
 
95
            $data = [
-
 
96
                'success' => false,
-
 
97
                'data' => 'ERROR_RECORD_NOT_FOUND'
Línea 79... Línea 98...
79
        $request = $this->getRequest();
98
            ];
80
 
99
 
81
      
100
            return new JsonModel($data);
82
        
101
        }    
83
    
102
    
84
 
103
 
85
        if($request->isGet()) {
104
        if($request->isGet()) {
-
 
105
            $formAdd = new CreateFeedForm($this->adapter);
-
 
106
            $this->layout()->setTemplate('layout/layout-backend');
-
 
107
            $viewModel = new ViewModel();
Línea 86... Línea 108...
86
            $formAdd = new CreateFeedForm($this->adapter);
108
            $viewModel->setTemplate('leaders-linked/my-trainer-answer/index.phtml');
87
            $this->layout()->setTemplate('layout/layout-backend');
109
            $viewModel->setVariables([