/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = isset($this->entries[$entity->getId()]) ? $this->entries[$entity->getId()] : array(); $value = $this->relationshipCollection->createChildCollection($entries); $entity->setAttribute($property->getName(), $value); return $value; }
/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = $entity->getAttribute($property->getIdentifier()); $value = $value ? explode("|", $value) : null; $entity->setAttribute($property->getName(), $value); return $value; }
/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = $entity->getAttribute($property->getIdentifier()); $value = $value && isset($this->files[$value]) ? $this->files[$value] : null; $entity->setAttribute($property->getName(), $value); return $value; }
/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = $entity->getAttribute($property->getIdentifier()); $value = $value ? Carbon::createFromFormat('U', $value) : null; $entity->setAttribute($property->getName(), $value); return $value; }
/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = isset($this->sortedRows[$entity->getId()][$property->getId()]) ? $this->sortedRows[$entity->getId()][$property->getId()] : new GridRowCollection(); $entity->setAttribute($property->getName(), $value); return $value; }
/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { if (isset($this->selections[$entity->getType()][$entity->getId()][$property->getId()])) { $value = $this->selections[$entity->getType()][$entity->getId()][$property->getId()]; } else { $value = new AssetCollection(); } $entity->setAttribute($property->getName(), $value); return $value; }
/** * {@inheritdoc} */ public function hydrate(AbstractEntity $entity, AbstractProperty $property) { $value = $this->parse($entity->getAttribute($property->getIdentifier())); $entity->setAttribute($property->getName(), $value); return $value; }