deblan.io-murph/core/Entity/Site/Page/ChoiceBlock.php

22 lines
345 B
PHP
Raw Normal View History

2021-09-09 13:58:00 +02:00
<?php
namespace App\Core\Entity\Site\Page;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class ChoiceBlock extends Block
{
public function getValue()
{
return json_decode(parent::getValue(), true);
}
public function setValue($value): self
{
return parent::setValue(json_encode($value));
}
}