<?php
namespace App\Entity\Gos\Uniqskills\Landing;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
*/
class LandingModuleBoolean extends LandingModuleItem
{
/**
* @param boolean $variableValue
*
* @return LandingModuleBoolean
* @throws \Exception
*/
public function setVariableValue($variableValue)
{
if (is_bool($variableValue))
{
$this->variableValue = $variableValue;
return $this;
}
throw new \Exception('Not boolean');
}
/**
* @return string|null
*/
public function getVariableValue()
{
//parse string from database to boolean
return filter_var($this->variableValue, FILTER_VALIDATE_BOOLEAN);
}
/**
* @return string
*/
public function getVariableType()
{
return $this::VARIABLE_TYPE_BOOLEAN;
}
}