/** * @param $object * @param array $params * @return Object\Localizedfield * @throws \Exception */ public function preGetData($object, $params = []) { if (!$object instanceof Object\Concrete) { throw new \Exception("Localized Fields are only valid in Objects"); } if (!$object->{$this->getName()} instanceof Object\Classificationstore) { $store = new Object\Classificationstore(); $store->setObject($object); $store->setFieldname($this->getName()); $object->{$this->getName()} = $store; } return $object->{$this->getName()}; }