plugin/tag/Serializer/TagSerializer.php
public function deserialize(array $data, Tag $tag): Tag
    {
        $this->sipe('name', 'setName', $data, $tag);
        $this->sipe('color', 'setColor', $data, $tag);
        $this->sipe('meta.description', 'setDescription', $data, $tag);

        if (isset($data['meta']) && isset($data['meta']['creator'])) {
            $user = $this->om->getRepository(User::class)->findBy(['uuid' => $data['meta']['creator']['id']]);
            if ($user) {
                $tag->setUser($user);
            }
        }

        return $tag;
    }
public function deserialize(array $data, Tag $tag): Tag
    {
        $this->sipe('name', 'setName', $data, $tag);
        $this->sipe('color', 'setColor', $data, $tag);
        $this->sipe('meta.description', 'setDescription', $data, $tag);

        if (isset($data['meta']) && isset($data['meta']['creator'])) {
            $user = $this->om->getRepository(User::class)->findBy(['uuid' => $data['meta']['creator']['id']]);
            if ($user) {
                $tag->setUser($user);
            }
        }

        return $tag;
    }
public function deserialize ( array $ data , Tag $ tag ) : Tag { $ this -> sipe ( 'name' , 'setName' , $ data , $ tag ) ; $ this -> sipe ( 'color' , 'setColor' , $ data , $ tag ) ; $ this -> sipe ( 'meta.description' , 'setDescription' , $ data , $ tag ) ; if ( isset ( $ data [ 'meta' ] ) && isset ( $ data [ 'meta' ] [ 'creator' ] ) ) { $ user = $ this -> om -> getRepository ( User :: class ) -> findBy ( [ 'uuid' => $ data [ 'meta' ] [ 'creator' ] [ 'id' ] ] ) ; if ( $ user ) { $ tag -> setUser ( $ user ) ; } } return $ tag ; }
Deserializes tag data into an Entity.

@param array $data
@param Tag   $tag

@return Tag
Deserializes tag data into an Entity .