public function getAuthors($blog)
    {
        $recordSet = $this->repo->findAuthorsByBlog($blog);
        $authorsIds = [];
        foreach ($recordSet as $value) {
            $authorsIds[] = $value['id'];
        }
        $authors = $this->userRepo->findBy(['id' => $authorsIds], ['lastName' => 'ASC']);
        $serializedAuthors = [];
        foreach ($authors as $author) {
            $serializedAuthors[] = $this->userSerializer->serialize($author, [Options::SERIALIZE_MINIMAL]);
        }

        return $serializedAuthors;
    }
public function getAuthors($blog)
    {
        $recordSet = $this->repo->findAuthorsByBlog($blog);
        $authorsIds = [];
        foreach ($recordSet as $value) {
            $authorsIds[] = $value['id'];
        }
        $authors = $this->userRepo->findBy(['id' => $authorsIds], ['lastName' => 'ASC']);
        $serializedAuthors = [];
        foreach ($authors as $author) {
            $serializedAuthors[] = $this->userSerializer->serialize($author, [Options::SERIALIZE_MINIMAL]);
        }

        return $serializedAuthors;
    }
public function getAuthors ( $ blog ) { $ recordSet = $ this -> repo -> findAuthorsByBlog ( $ blog ) ; $ authorsIds = [ ] ; foreach ( $ recordSet as $ value ) { $ authorsIds [ ] = $ value [ 'id' ] ; } $ authors = $ this -> userRepo -> findBy ( [ 'id' => $ authorsIds ] , [ 'lastName' => 'ASC' ] ) ; $ serializedAuthors = [ ] ; foreach ( $ authors as $ author ) { $ serializedAuthors [ ] = $ this -> userSerializer -> serialize ( $ author , [ Options :: SERIALIZE_MINIMAL ] ) ; } return $ serializedAuthors ; }
Get blog post authors.

@param Blog $blog

@return array
Get blog post authors .