select('au.id, au.id_block, au.name, au.surname, au.nick, au.note, au.photo') ->from('articles_authors', 'au') ->andWhere(Operator::equals(['au.id' => $idAuthor])) ->andWhere(Translation::coalesceTranslatedFields(ArticlesAuthorsTranslation::class)) ->execute() ->fetchAssociative(); $author = $this->entityUtil->createEntity($rawAuthorData, ArticleAuthor::class); $this->author = (clone $this->articleAuthorWrapper)->setObject($author); } public function getAuthor(): ?ArticleAuthorWrapper { return $this->author ?? null; } }