Commit 0067f029 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Retour de l'ID en extract, pour usage au besoin

parent 061c41c2
Loading
Loading
Loading
Loading
+3
Changes for module/Application/src/Hydrator/GenericHydrator.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -55,6 +55,9 @@ class GenericHydrator implements HydratorInterface
    public function extract($object): array
    {
        $data = [];
        if (method_exists($object, 'getId')) {
            $data['id'] = (string)$object->getId();
        }
        foreach ($this->elements as $name => $params) {
            if (!in_array($name, $this->noGenericParse)) {
                $type   = isset($params['type']) ? $params['type'] : null;