Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 6380 Rev 6381
Línea 205... Línea 205...
205
            if ($form->isValid()) {
205
            if ($form->isValid()) {
206
                $dataPost = (array) $form->getData();
206
                $dataPost = (array) $form->getData();
Línea 207... Línea 207...
207
 
207
 
Línea 208... Línea 208...
208
                $hydrator = new ObjectPropertyHydrator();
208
                $hydrator = new ObjectPropertyHydrator();
209
 
209
 
Línea 210... Línea 210...
210
                $location = new Location();
210
                // $location = new Location();
211
                $hydrator->hydrate($dataPost, $location);
211
                // $hydrator->hydrate($dataPost, $location);
212
                
212
                
213
                $locationMapper= LocationMapper::getInstance($this->adapter);
213
                // $locationMapper= LocationMapper::getInstance($this->adapter);
214
                $resultLocation = $locationMapper->insert($location);
214
                // $resultLocation = $locationMapper->insert($location);
215
                return new JsonModel([
215
                // return new JsonModel([
216
                    'success'   => false,
216
                //     'success'   => false,
217
                    'data' => $resultLocation                       
217
                //     'data' => $resultLocation                       
218
                ]);
218
                // ]);
219
                if (!$resultLocation) {
219
                // if (!$resultLocation) {
220
                    return new JsonModel([
220
                //     return new JsonModel([
221
                        'success'   => false,
221
                //         'success'   => false,
Línea 222... Línea 222...
222
                        'data' => 'ERROR_THERE_WAS_AN_ERROR'                       
222
                //         'data' => 'ERROR_THERE_WAS_AN_ERROR'                       
223
                    ]);
223
                //     ]);
Línea 224... Línea 224...
224
                }
224
                // }