Show a logo for podcasts
This commit is contained in:
parent
c78a8be664
commit
bae2f78f3f
|
@ -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;
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue