main/core/API/Serializer/Resource/ResourceNodeSerializer.php
private function serializePoster(ResourceNode $resourceNode)
    {
        if (!empty($resourceNode->getPoster())) {
            /** @var PublicFile $file */
            $file = $this->om
                ->getRepository(PublicFile::class)
                ->findOneBy(['url' => $resourceNode->getPoster()]);

            if ($file) {
                return $this->fileSerializer->serialize($file);
            }
        }

        return null;
    }
private function serializePoster(ResourceNode $resourceNode)
    {
        if (!empty($resourceNode->getPoster())) {
            /** @var PublicFile $file */
            $file = $this->om
                ->getRepository(PublicFile::class)
                ->findOneBy(['url' => $resourceNode->getPoster()]);

            if ($file) {
                return $this->fileSerializer->serialize($file);
            }
        }

        return null;
    }
private function serializePoster ( ResourceNode $ resourceNode ) { if ( ! empty ( $ resourceNode -> getPoster ( ) ) ) { /** @var PublicFile $file */ $ file = $ this -> om -> getRepository ( PublicFile :: class ) -> findOneBy ( [ 'url' => $ resourceNode -> getPoster ( ) ] ) ; if ( $ file ) { return $ this -> fileSerializer -> serialize ( $ file ) ; } } return null ; }
Serialize the resource poster.

@param ResourceNode $resourceNode

@return array|null
Serialize the resource poster .