Ejemplo n.º 1
0
 public function format(Post $post) : array
 {
     $postTypeObject = $this->postTypeFactory->createPostTypeByIntCode($post->getPostTypeCode());
     return array_merge_recursive($post->toJSON(), ['post_type' => $postTypeObject->toJSON(), 'profile' => $this->profileService->getProfileById($post->getAuthorProfile()->getId())->toJSON(), 'attachments' => $this->formatAttachments($post)]);
 }
 protected function isIndexable(Post $entity) : bool
 {
     return $entity->getPostTypeCode() === DiscussionPostType::CODE_INT;
 }