Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 6617 Rev 6627
Línea 202... Línea 202...
202
 
202
 
Línea 203... Línea 203...
203
            $form->setData($dataPost);
203
            $form->setData($dataPost);
204
 
204
 
205
            if ($form->isValid()) {
-
 
206
                $dataPost = (array) $form->getData();
-
 
207
                return new JsonModel([
-
 
208
                    'success' => false,
-
 
Línea 209... Línea 205...
209
                    'data' => $dataPost
205
            if ($form->isValid()) {
Línea 210... Línea -...
210
                ]);
-
 
211
 
-
 
212
                $hydrator = new ObjectPropertyHydrator();
-
 
213
 
-
 
214
                // $location = new Location();
-
 
215
                // $hydrator->hydrate($dataPost, $location);
-
 
216
                
-
 
217
                // $locationMapper= LocationMapper::getInstance($this->adapter);
-
 
218
                // $resultLocation = $locationMapper->insert($location);
-
 
219
                // return new JsonModel([
-
 
220
                //     'success'   => false,
-
 
221
                //     'data' => $resultLocation                       
-
 
222
                // ]);
-
 
223
                // if (!$resultLocation) {
-
 
224
                //     return new JsonModel([
-
 
225
                //         'success'   => false,
-
 
226
                //         'data' => 'ERROR_THERE_WAS_AN_ERROR'                       
206
                $dataPost = (array) $form->getData();
227
                //     ]);
207
 
Línea 228... Línea 208...
228
                // }
208
                $hydrator = new ObjectPropertyHydrator();
229
 
209
 
Línea 248... Línea 228...
248
                    $jobDescription = new SurveyJobDescription();
228
                    $jobDescription = new SurveyJobDescription();
249
                    $skill = new SurveySkill();
229
                    $skill = new SurveySkill();
250
                    $industry = new SurveyIndustry();
230
                    $industry = new SurveyIndustry();
251
                    $language = new SurveyLanguage();
231
                    $language = new SurveyLanguage();
Línea 252... Línea 232...
252
 
232
 
Línea 253... Línea 233...
253
                    // if(!empty($resultLocation)){ 
233
                    if(!empty($dataPost['location_search'])){ 
254
 
-
 
255
                    //     $surveyLocationMapper = SurveyLocationMapper::getInstance($this->adapter);
-
 
Línea -... Línea 234...
-
 
234
 
-
 
235
                        $surveyLocationMapper = SurveyLocationMapper::getInstance($this->adapter);
-
 
236
    
-
 
237
                        $ok = true;
-
 
238
 
-
 
239
                        $formatted_address = $dataPost['formatted_address'];
-
 
240
                        $city1 = $dataPost['city1'];
-
 
241
                        $city2 = $dataPost['city2'];
-
 
242
                        $address1 = $dataPost['address1'];
-
 
243
                        $address2 = $dataPost['address2'];
-
 
244
                        $country = $dataPost['country'];
-
 
245
                        $latitude = $dataPost['latitude'];
-
 
246
                        $longitude = $dataPost['longitude'];
-
 
247
                        $postal_code = $dataPost['postal_code'];
256
    
248
                        $state = $dataPost['state'];
-
 
249
 
257
                    //     $ok = true;
250
                        
258
    
251
                        $record = new SurveyLocation();
-
 
252
                        $record->formatted_address = $formatted_address; 
259
                    //     $record = new SurveyLocation();
253
                        $record->city1 = $city1;
260
                    //     $record->country = $location->country;
254
                        $record->city2 = $city2;
261
                    //     $record->city1 = $location->city1;
255
                        $record->address1 = $address1;
262
                    //     $record->state = $location->state;                       
256
                        $record->address2 = $address2;
-
 
257
                        $record->country = $country;
-
 
258
                        $record->latitude = $latitude;
263
                    //     $record->postal_code = $location->postal_code;                   
259
                        $record->longitude = $longitude;
264
                    //     $record->latitude = $location->latitude;                   
260
                        $record->postal_code = $postal_code;
265
                    //     $record->longitude = $location->longitude;          
261
                        $record->state = $state;
266
                    //     $record->survey_id = $survey->id;
262
                        $record->survey_id = $survey->id;
267
                    //     $result = $surveyLanguageMapper->insert($record);
263
                        $result = $surveyLocationMapper->insert($record);
Línea 268... Línea 264...
268
                    //     $ok = $ok && $result;
264
                        $ok = $ok && $result;
269
                    //        //}
265
                           //}
Línea 270... Línea 266...
270
                    //       if($ok){
266
                          if($ok){
Línea 271... Línea 267...
271
    
267