CRUDlex\AbstractData::hydrate PHP Method

hydrate() protected method

Creates an {@see Entity} from the raw data array with the field name as keys and field values as values.
protected hydrate ( array $row ) : Entity
$row array the array with the raw data
return Entity the entity containing the array data then
    protected function hydrate(array $row)
    {
        $fieldNames = $this->definition->getFieldNames(true);
        $entity = new Entity($this->definition);
        foreach ($fieldNames as $fieldName) {
            $entity->set($fieldName, $row[$fieldName]);
        }
        return $entity;
    }