Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 309 Rev 310
Línea 108... Línea 108...
108
                $items = [];
108
                $items = [];
109
                $records = $paginator->getCurrentItems();
109
                $records = $paginator->getCurrentItems();
110
                foreach($records as $record)
110
                foreach($records as $record)
111
                {
111
                {
112
                    $item = [
112
                    $item = [
113
                        'id' => $record->uid,
113
                        'id' => $record->uuid,
114
                        'name' => $record->name,
114
                        'name' => $record->name,
115
                        'description' => $record->description,
115
                        'description' => $record->description,
Línea 116... Línea 116...
116
            
116
            
117
                        'actions' => [
117
                        'actions' => [
Línea 172... Línea 172...
172
                $result = $habitValueMapper->insert($habitValue );
172
                $result = $habitValueMapper->insert($habitValue );
Línea 173... Línea 173...
173
                
173
                
174
                if($result) {
174
                if($result) {
Línea 175... Línea 175...
175
                    $this->logger->info('Se agrego el valor : ' . $habitValue->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
175
                    $this->logger->info('Se agrego el valor : ' . $habitValue->name, ['user_id' => $currentUser->id, 'ip' => Functions::getUserIP()]);
Línea 176... Línea 176...
176
                    
176
                    
177
                    $habitValue = $habitValueMapper->fetchOne($habitValueMapper->id);
177
                    $habitValue = $habitValueMapper->fetchOne($habitValue->id);
178
                    
178
                    
Línea 179... Línea 179...
179
                    $acl            = $this->getEvent()->getViewModel()->getVariable('acl');
179
                    $acl            = $this->getEvent()->getViewModel()->getVariable('acl');
180
                    $allowEdit      = $acl->isAllowed($currentUser->usertype_id, 'habits/values/edit');
180
                    $allowEdit      = $acl->isAllowed($currentUser->usertype_id, 'habits/values/edit');
181
                    $allowDelete    = $acl->isAllowed($currentUser->usertype_id, 'habits/values/delete');
181
                    $allowDelete    = $acl->isAllowed($currentUser->usertype_id, 'habits/values/delete');
182
                    
182
                    
183
                    $data = [
183
                    $data = [
184
                        'success'   => true,
184
                        'success'   => true,
185
                        'message'   => 'LABEL_RECORD_ADDED',
185
                        'message'   => 'LABEL_RECORD_ADDED',
Línea 186... Línea 186...
186
                        'data'      => [
186
                        'data'      => [
187
                            'id' => $habitValue->uid,
187
                            'id' => $habitValue->uuid,
Línea 301... Línea 301...
301
                    
301
                    
302
                    $data = [
302
                    $data = [
303
                        'success'   => true,
303
                        'success'   => true,
304
                        'message'   => 'LABEL_RECORD_UPDATED',
304
                        'message'   => 'LABEL_RECORD_UPDATED',
305
                        'data'      => [
305
                        'data'      => [
306
                            'id' => $habitValue->uid,
306
                            'id' => $habitValue->uuid,
307
                            'name' => $habitValue->name,
307
                            'name' => $habitValue->name,
Línea 308... Línea 308...
308
                            'description' => $habitValue->description,
308
                            'description' => $habitValue->description,
309
                            
309