<?php
namespace Sintra\CMSCoreBundle\Model\Document\Editable;
class Monaco extends \Pimcore\Model\Document\Editable
{
protected $value;
public function frontend()
{
return (string)$this->value;
}
public function getData()
{
return $this->value;
}
/**
* Returns type, has to be the same as in js and yaml file
*/
public function getType()
{
return 'monaco';
}
/**
* Used for getting data from editmode
*/
public function setDataFromEditmode($data)
{
$this->value = $data;
return $this;
}
public function getValue()
{
return $this->getData();
}
/**
* Used for getting data from database
*/
public function setDataFromResource($data)
{
$this->value = $data;
return $this;
}
public function isEmpty()
{
return empty($this->value);
}
}