Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5848 Rev 6605
Línea 100... Línea 100...
100
                    
100
                    
101
                }
101
                }
Línea 102... Línea 102...
102
            }
102
            }
-
 
103
            
-
 
104
            if($isJson) {
-
 
105
                
-
 
106
                $feed_uuid = $this->params()->fromRoute('feed');
-
 
107
                if($feed_uuid) {
-
 
108
                    $feedMapper = FeedMapper::getInstance($this->adapter);
-
 
109
                    $feed = $feedMapper->fetchOneByUuidAnyStatus($feed_uuid);
-
 
110
                } else {
-
 
111
                    $feed = '';
-
 
112
                }
103
            
113
                
104
            if($isJson) {
114
                
Línea 105... Línea 115...
105
                $profileVisitMapper = ProfileVisitMapper::getInstance($this->adapter);
115
                $profileVisitMapper = ProfileVisitMapper::getInstance($this->adapter);
Línea 127... Línea 137...
127
                    $country = '';
137
                    $country = '';
128
                }
138
                }
Línea 129... Línea 139...
129
                
139
                
Línea -... Línea 140...
-
 
140
                $image_size = $this->config['leaderslinked.image_sizes.feed_image_upload'];
-
 
141
                
-
 
142
                if($user->location_id) {
-
 
143
                    $locationMapper = LocationMapper::getInstance($this->adapter);
-
 
144
                    $location = $locationMapper->fetchOne($user->location_id);
-
 
145
                    
-
 
146
                    $country = $location->country;
-
 
147
                } else {
-
 
148
                    $country = '';
-
 
149
                }
-
 
150
                
-
 
151
                $userProfileMapper = UserProfileMapper::getInstance($this->adapter);
-
 
152
                $userProfile = $userProfileMapper->fetchOnePublicByUserId($currentUser->id);
-
 
153
 
-
 
154
 
-
 
155
                if($feed) {
-
 
156
                    $routeTimeline = $this->url()->fromRoute('feed/timeline', ['id' => $currentUser->uuid, 'type' => 'user', 'feed' => $feed->uuid]);
-
 
157
                } else {
-
 
158
                    $routeTimeline = $this->url()->fromRoute('feed/timeline', ['id' => $currentUser->uuid, 'type' => 'user']);
130
                $image_size = $this->config['leaderslinked.image_sizes.feed_image_upload'];
159
                }
131
                
160
                
132
                return new JsonModel([
161
                return new JsonModel([
133
                    'user_uuid' => $user->uuid,
162
                    'user_uuid' => $user->uuid,
-
 
163
                    'image' => $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image]),
134
                    'image' => $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image]),
164
                    'fullname' => trim($user->first_name . ' ' . $user->last_name),
135
                    'fullname' => trim($user->first_name . ' ' . $user->last_name),
165
                    'description' => empty($userProfile->description) ? '' :  trim($userProfile->description) ,
136
                    'country' => $country,
166
                    'country' => $country,
137
                    'visits' => $visits,
167
                    'visits' => $visits,
-
 
168
                    'connections' => $connections,
-
 
169
                    'image_size' => $image_size,
-
 
170
                    'feed' => '',
-
 
171
                    'routeTimeline' => $routeTimeline,
-
 
172
                    'moodle_name' => $currentNetwork->moodle_name ?  $currentNetwork->moodle_name : '',
-
 
173
                    'moodle_image' => $this->url()->fromRoute('storage-network', ['type' => 'moodle']),
-
 
174
                    'microlearning_appstore' => $currentNetwork->microlearning_appstore ?  $currentNetwork->microlearning_appstore : '' ,
-
 
175
                    'microlearning_playstore' => $currentNetwork->microlearning_playstore ? $currentNetwork->microlearning_playstore : '',
138
                    'connections' => $connections,
176
                    
Línea 139... Línea 177...
139
                    'image_size' => $image_size,
177
                    
Línea 140... Línea 178...
140
                ]);
178
                ]);