/** * {@inheritdoc} */ public function toArray() { $value = parent::toArray(); if ($this->getUnit() !== null) { $value['unit'] = $this->getUnit(); } $value[$this->getField()] = $this->getLocation(); return $value; }
public function __construct(array $data) { return parent::__construct($data); }