<?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
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $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');
    }
}
