Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 1 Rev 60
Línea 223... Línea 223...
223
                    if (strlen($description) > 120) {
223
                    if (strlen($description) > 120) {
224
                        $description = substr($description, 0, 120) . '...';
224
                        $description = substr($description, 0, 120) . '...';
225
                    }
225
                    }
Línea 226... Línea 226...
226
 
226
 
227
                    $item = [
227
                    $item = [
228
                        'image' => $this->url()->fromRoute('storage', ['type' => 'knowledge-area', 'code' => $record->uuid,  'filename' => $record->image]),
228
                        'image' => $this->url()->fromRoute('storage', ['type' => 'knowledge-area', 'code' => $record->uuid,  'filename' => $record->image],['force_canonical' => true]),
229
                        'title' => $record->title,
229
                        'title' => $record->title,
230
                        'description' => $description,
230
                        'description' => $description,
231
                        'category' => $categories[$record->category_id]['name'],
231
                        'category' => $categories[$record->category_id]['name'],
Línea 779... Línea 779...
779
                    'data' => [
779
                    'data' => [
780
                        'category' => $knowledgeAreaCategory->name,
780
                        'category' => $knowledgeAreaCategory->name,
781
                        'title' => $knowledgeAreaContent->title,
781
                        'title' => $knowledgeAreaContent->title,
782
                        'description' => $knowledgeAreaContent->description,
782
                        'description' => $knowledgeAreaContent->description,
783
                        'link' => $knowledgeAreaContent->link,
783
                        'link' => $knowledgeAreaContent->link,
784
                        'image' =>  $this->url()->fromRoute('storage', ['type' => 'knowledge-area', 'code' =>  $knowledgeAreaContent->uuid,  'filename' =>  $knowledgeAreaContent->image]),
784
                        'image' =>  $this->url()->fromRoute('storage', ['type' => 'knowledge-area', 'code' =>  $knowledgeAreaContent->uuid,  'filename' =>  $knowledgeAreaContent->image],['force_canonical' => true]),
785
                        'attachment' =>  $knowledgeAreaContent->attachment ? $this->url()->fromRoute('storage', ['type' => 'knowledge-area', 'code' =>  $knowledgeAreaContent->uuid,  'filename' =>  $knowledgeAreaContent->attachment]) : '',
785
                        'attachment' =>  $knowledgeAreaContent->attachment ? $this->url()->fromRoute('storage', ['type' => 'knowledge-area', 'code' =>  $knowledgeAreaContent->uuid,  'filename' =>  $knowledgeAreaContent->attachment],['force_canonical' => true]) : '',
786
                        'reaction' => $contentReaction ? $contentReaction->reaction : '',
786
                        'reaction' => $contentReaction ? $contentReaction->reaction : '',
787
                        'routeComments' => $this->url()->fromRoute('knowledge-area/comments', ['id' => $knowledgeAreaContent->uuid]),
787
                        'routeComments' => $this->url()->fromRoute('knowledge-area/comments', ['id' => $knowledgeAreaContent->uuid]),
788
                        'routeCommentAdd' => $this->url()->fromRoute('knowledge-area/comments/add', ['id' => $knowledgeAreaContent->uuid]),
788
                        'routeCommentAdd' => $this->url()->fromRoute('knowledge-area/comments/add', ['id' => $knowledgeAreaContent->uuid]),
789
                        'routeSaveReaction' => $this->url()->fromRoute('knowledge-area/save-reaction', ['id' => $knowledgeAreaContent->uuid]),
789
                        'routeSaveReaction' => $this->url()->fromRoute('knowledge-area/save-reaction', ['id' => $knowledgeAreaContent->uuid]),
790
                        'routeDeleteReaction' => $this->url()->fromRoute('knowledge-area/delete-reaction', ['id' => $knowledgeAreaContent->uuid]),
790
                        'routeDeleteReaction' => $this->url()->fromRoute('knowledge-area/delete-reaction', ['id' => $knowledgeAreaContent->uuid]),
Línea 1168... Línea 1168...
1168
            $userMapper = UserMapper::getInstance($this->adapter);
1168
            $userMapper = UserMapper::getInstance($this->adapter);
Línea 1169... Línea 1169...
1169
 
1169
 
Línea 1170... Línea 1170...
1170
            $user = $userMapper->fetchOne($record->user_id);
1170
            $user = $userMapper->fetchOne($record->user_id);
1171
 
1171
 
1172
            $item['unique'] = uniqid();
1172
            $item['unique'] = uniqid();
1173
            $item['user_image'] = $this->url()->fromRoute('storage', ['type' => 'user',  'code' => $user->uuid, 'filename' =>  $user->image]);
1173
            $item['user_image'] = $this->url()->fromRoute('storage', ['type' => 'user',  'code' => $user->uuid, 'filename' =>  $user->image],['force_canonical' => true]);
1174
            $item['user_url'] = $this->url()->fromRoute('profile/view', ['id' => $user->uuid]);
1174
            $item['user_url'] = $this->url()->fromRoute('profile/view', ['id' => $user->uuid]);
1175
            $item['user_name'] = $user->first_name . ' ' . $user->last_name;
1175
            $item['user_name'] = $user->first_name . ' ' . $user->last_name;
1176
            $item['time_elapsed'] = Functions::timeAgo($record->added_on, $now);
1176
            $item['time_elapsed'] = Functions::timeAgo($record->added_on, $now);