Example #1
0
 /**
  * Contructs a new TextValueHolder instance from a given value.
  *
  * @param IField $field
  * @param mixed $value
  */
 protected function __construct(IField $field, $value = null)
 {
     if (!$field instanceof UuidField) {
         throw new Error\BadValueException("Only instances of UuidField my be associated with UuidValueHolder.");
     }
     parent::__construct($field, $value);
 }
 public function setValue($value)
 {
     $value = (string) $value;
     if ($this->getField()->getOption('use_richtext', false)) {
         $value = html_entity_decode(htmlspecialchars_decode($value, ENT_COMPAT), ENT_COMPAT, 'UTF-8');
     }
     parent::setValue($value);
 }