Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 17070 Rev 17071
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
                return $this->handleJsonRequest($currentUser, $currentCompany);
98
                $this->handleJsonRequest($currentUser, $currentCompany);
Línea 99... Línea 99...
99
            }
99
            }
100
 
100
 
101
            return $this->handleHtmlRequest($currentCompany);
101
            return $this->handleHtmlRequest($currentCompany);
Línea 168... Línea 168...
168
                $orderDirection
168
                $orderDirection
169
            );
169
            );
Línea 170... Línea 170...
170
 
170
 
Línea 171... Línea 171...
171
            $items = $this->prepareCapsuleItems($paginator->getCurrentItems(), $currentCompany, $permissions);
171
            $items = $this->prepareCapsuleItems($paginator->getCurrentItems(), $currentCompany, $permissions);
172
 
172
 
173
            $response = [
173
            return new JsonModel([
174
                'success' => true,
174
                'success' => true,
175
                'data' => [
175
                'data' => [
176
                    'link_add' => $permissions['allowAdd'] ? $this->url()->fromRoute('microlearning/content/capsules/add') : '',
176
                    'link_add' => $permissions['allowAdd'] ? $this->url()->fromRoute('microlearning/content/capsules/add') : '',
177
                    'items' => $items,
177
                    'items' => $items,
178
                    'total' => $paginator->getTotalItemCount(),
178
                    'total' => $paginator->getTotalItemCount(),
179
                ]
-
 
180
            ];
-
 
Línea 181... Línea 179...
181
 
179
                ]
182
            return new JsonModel($response);
180
            ]);
183
 
181
 
184
        } catch (\Exception $e) {
182
        } catch (\Exception $e) {