2021-03-30 20:40:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Entity\Page;
|
|
|
|
|
|
|
|
use App\Core\Entity\Site\Page\Block;
|
|
|
|
use App\Core\Entity\Site\Page\Page;
|
|
|
|
use App\Core\Form\Site\Page\TextBlockType;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Entity
|
|
|
|
*/
|
|
|
|
class RssPage extends Page
|
|
|
|
{
|
2021-09-09 13:57:54 +02:00
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
2021-03-30 20:40:20 +02:00
|
|
|
{
|
|
|
|
$builder->add(
|
|
|
|
'title',
|
|
|
|
TextBlockType::class,
|
|
|
|
[
|
|
|
|
'label' => 'Titre',
|
|
|
|
'required' => true,
|
|
|
|
'attr' => [
|
|
|
|
],
|
|
|
|
'constraints' => [
|
|
|
|
],
|
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
$builder->add(
|
|
|
|
'link',
|
|
|
|
TextBlockType::class,
|
|
|
|
[
|
|
|
|
'label' => 'Lien',
|
|
|
|
'required' => true,
|
|
|
|
'attr' => [
|
|
|
|
],
|
|
|
|
'constraints' => [
|
|
|
|
],
|
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
$builder->add(
|
|
|
|
'description',
|
|
|
|
TextBlockType::class,
|
|
|
|
[
|
|
|
|
'label' => 'Description',
|
|
|
|
'required' => true,
|
|
|
|
'attr' => [
|
|
|
|
],
|
|
|
|
'constraints' => [
|
|
|
|
],
|
|
|
|
]
|
|
|
|
);
|
|
|
|
|
|
|
|
$builder->add(
|
|
|
|
'language',
|
|
|
|
TextBlockType::class,
|
|
|
|
[
|
|
|
|
'label' => 'Langue',
|
|
|
|
'required' => true,
|
|
|
|
'attr' => [
|
|
|
|
],
|
|
|
|
'constraints' => [
|
|
|
|
],
|
|
|
|
]
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setTitle(Block $block)
|
|
|
|
{
|
|
|
|
return $this->setBlock($block);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getTitle()
|
|
|
|
{
|
|
|
|
return $this->getBlock('title');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setLink(Block $block)
|
|
|
|
{
|
|
|
|
return $this->setBlock($block);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getLink()
|
|
|
|
{
|
|
|
|
return $this->getBlock('link');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setDescription(Block $block)
|
|
|
|
{
|
|
|
|
return $this->setBlock($block);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription()
|
|
|
|
{
|
|
|
|
return $this->getBlock('description');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setLanguage(Block $block)
|
|
|
|
{
|
|
|
|
return $this->setBlock($block);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getLanguage()
|
|
|
|
{
|
|
|
|
return $this->getBlock('language');
|
|
|
|
}
|
|
|
|
}
|