<?php

namespace App\Entity\Page;

use App\Core\Entity\Site\Page\Block;
use App\Core\Entity\Site\Page\FileBlock;
use App\Core\Form\Site\Page\TextareaBlockType;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Form\FormBuilderInterface;
use App\Core\Entity\Site\Page\Page;

/**
 * @ORM\Entity
 */
class TextPage extends Page
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add(
            'content',
            TextareaBlockType::class,
            [
                'label' => 'Contenu',
                'options' => [
                    'attr' => [
                        'rows' => '50',
                    ],
                    'constraints' => [
                    ],
                ],
            ]
        );
    }

    public function setContent(Block $block)
    {
        return $this->setBlock($block);
    }

    public function getContent()
    {
        return $this->getBlock('content');
    }
}
