45 lines
962 B
PHP
45 lines
962 B
PHP
|
<?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)
|
||
|
{
|
||
|
$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');
|
||
|
}
|
||
|
}
|