deblan.io-murph/src/Entity/Page/TextPage.php
Simon Vieille 22a7738e14
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/deployment/woodpecker Pipeline was successful
remove form elements of TextPage
2023-04-16 22:57:36 +02:00

51 lines
1.1 KiB
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, array $options)
{
$builder->add(
'content',
TextareaBlockType::class,
[
'label' => 'Contenu',
'options' => [
'attr' => [
'rows' => '50',
],
'constraints' => [
],
],
]
);
$builder
->remove('metaTitle')
->remove('metaDescription')
->remove('ogTitle')
->remove('ogDescription')
->remove('ogImage')
;
}
public function setContent(Block $block)
{
return $this->setBlock($block);
}
public function getContent()
{
return $this->getBlock('content');
}
}