/** * @param ContentInterface $about * * @return array */ public function loadAboutBundles(ContentInterface $about) { $limitCommentCount = 3; $remainCommentCount = 0; $poster = app()->auth()->getViewer(); $commentService = app()->commentService(); $likeService = app()->likeService(); if ($about instanceof ContentInterface) { if ($about->getCommentCount() > $limitCommentCount) { $remainCommentCount = $about->getCommentCount() - $limitCommentCount; } } $place = null; $story = null; $people = null; $shareCount = null; $story = $about->getStory(); $people = $this->decorateTagPeople($about->getPeople()); $place = $about->getPlace(); $shareCount = $about->getShareCount(); return ['place' => $place, 'hasStory' => !empty($story), 'story' => $story, 'people' => $people, 'hasAttachment' => !$about instanceof FeedStatus, 'attachmentId' => $about->getId(), 'about' => $about, 'shareCount' => $shareCount, 'poster' => $about->getPoster(), 'commentList' => $commentService->getCommentList($about, 0, 0, $limitCommentCount), 'limitCommentCount' => $limitCommentCount, 'remainCommentCount' => $remainCommentCount, 'like' => $likeService->getLikeResult($poster, $about, 2)]; }