eZ\Publish\Core\Search\Elasticsearch\Content\Mapper\StandardMapper::mapContentById PHP Method

mapContentById() public method

Maps given Content by given $contentId to a Document.
public mapContentById ( integer | string $contentId ) : Document
$contentId integer | string
return eZ\Publish\Core\Search\Elasticsearch\Content\Document
    public function mapContentById($contentId)
    {
        $contentInfo = $this->contentHandler->loadContentInfo($contentId);
        return $this->mapContent($this->contentHandler->load($contentId, $contentInfo->currentVersionNo));
    }