A field value object is to be understood with associated field type.
Inheritance: extends eZ\Publish\API\Repository\Values\ValueObject, implements eZ\Publish\SPI\FieldType\Value
Ejemplo n.º 1
0
 /**
  * Value constructor.
  *
  * Can pass in the json encoded string of selected classes. Or the correctly formed
  * params array.
  *
  * E.G. array( 'classes' => array( 'identifier_1', 'identifier_2' ) )
  *
  * @param array $params
  */
 public function __construct($params = array())
 {
     if (!is_array($params)) {
         $params = array('classes' => json_decode($params));
     }
     parent::__construct($params);
 }
Ejemplo n.º 2
0
 public function __isset($propertyName)
 {
     if ($propertyName == 'path') {
         return true;
     }
     return parent::__isset($propertyName);
 }
Ejemplo n.º 3
0
 public function __construct(array $values = array())
 {
     parent::__construct($values);
     $this->media_tags = explode(',', $this->media_tag_string);
 }
Ejemplo n.º 4
0
 public function __construct($values = array())
 {
     parent::__construct($values);
     $this->rounded_average = intval($this->rating_average * 2 + 0.5) / 2;
     $this->rating = round($this->rating_average, 1);
 }
Ejemplo n.º 5
0
 protected function checkValueStructure(CoreValue $value)
 {
     if ($value->__toString() === '') {
         throw new InvalidArgumentValue('$value->id', 'empty', $value->__toString());
     }
 }