Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 17071 | Rev 17073 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 17071 Rev 17072
Línea 93... Línea 93...
93
            $currentUserPlugin = $this->plugin('currentUserPlugin');
93
            $currentUserPlugin = $this->plugin('currentUserPlugin');
94
            $currentUser = $currentUserPlugin->getUser();
94
            $currentUser = $currentUserPlugin->getUser();
95
            $currentCompany = $currentUserPlugin->getCompany();
95
            $currentCompany = $currentUserPlugin->getCompany();
Línea 96... Línea 96...
96
 
96
 
97
            if ($this->isJsonRequest($request)) {
97
            if ($this->isJsonRequest($request)) {
-
 
98
                $response = $this->handleJsonRequest($currentUser, $currentCompany);
98
                $this->handleJsonRequest($currentUser, $currentCompany);
99
                return new JsonModel($response);
Línea 99... Línea 100...
99
            }
100
            }
100
 
101
 
101
            return $this->handleHtmlRequest($currentCompany);
102
            return $this->handleHtmlRequest($currentCompany);
Línea 168... Línea 169...
168
                $orderDirection
169
                $orderDirection
169
            );
170
            );
Línea 170... Línea 171...
170
 
171
 
Línea 171... Línea 172...
171
            $items = $this->prepareCapsuleItems($paginator->getCurrentItems(), $currentCompany, $permissions);
172
            $items = $this->prepareCapsuleItems($paginator->getCurrentItems(), $currentCompany, $permissions);
172
 
173
 
173
            return new JsonModel([
174
            return [
174
                'success' => true,
175
                'success' => true,
175
                'data' => [
176
                'data' => [
176
                    'link_add' => $permissions['allowAdd'] ? $this->url()->fromRoute('microlearning/content/capsules/add') : '',
177
                    'link_add' => $permissions['allowAdd'] ? $this->url()->fromRoute('microlearning/content/capsules/add') : '',
177
                    'items' => $items,
178
                    'items' => $items,
178
                    'total' => $paginator->getTotalItemCount(),
179
                    'total' => $paginator->getTotalItemCount(),
Línea 179... Línea 180...
179
                ]
180
                ]
180
            ]);
181
            ];
181
 
182
 
182
        } catch (\Exception $e) {
183
        } catch (\Exception $e) {