Show a logo for podcasts

This commit is contained in:
dece 2023-05-13 02:09:06 +02:00
parent c78a8be664
commit bae2f78f3f
2 changed files with 5 additions and 4 deletions

View file

@ -2,6 +2,7 @@
namespace App\Entity;
use App\Constants;
use App\Repository\PodcastRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
@ -41,7 +42,7 @@ class Podcast
private string $email;
#[ORM\Column(length: 255, nullable: true)]
private string $logoFilename;
private ?string $logoFilename;
public function __construct()
{
@ -165,12 +166,12 @@ class Podcast
return $this;
}
public function getLogoFilename(): string
public function getLogoFilename(): ?string
{
return $this->logoFilename;
}
public function setLogoFilename(string $logoFilename): self
public function setLogoFilename(?string $logoFilename): self
{
$this->logoFilename = $logoFilename;

View file

@ -44,10 +44,10 @@ class FeedService
$channelElement->appendChild(new DOMElement('description', $podcast->getDescription()));
$channelElement->appendChild(new DOMElement('link', $podcast->getWebsite()));
$imageElement = new DOMElement('image');
$channelElement->appendChild($imageElement);
$imageElement->appendChild(new DOMElement('url', $podcast->getLogoUrl()));
$imageElement->appendChild(new DOMElement('title', 'logo'));
$imageElement->appendChild(new DOMElement('link', $podcast->getWebsite()));
$channelElement->appendChild($imageElement);
$episodes = $this->entityManager->createQuery(
'SELECT e FROM App\Entity\Episode e'