22 lines
345 B
PHP
22 lines
345 B
PHP
|
<?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));
|
||
|
}
|
||
|
}
|