/** * Transforms a hash into a FieldType Value using `FieldType::fromHash()`. * The FieldValue is compatible with `transform()`. * * @param array $value * * @return \eZ\Publish\SPI\FieldType\Value */ public function reverseTransform($value) { if (!$value) { return $this->fieldType->getEmptyValue(); } return $this->fieldType->fromHash($value); }
/** * Returns the fallback default value of field type when no such default * value is provided in the field definition in content types. * * @return mixed */ public function getEmptyValue() { return $this->innerFieldType->getEmptyValue(); }