Change snip and tag entities to public columns
This commit is contained in:
@ -34,7 +34,7 @@ class TagsType extends AbstractType implements DataTransformerInterface
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$tags = array_map(fn(Tag $tag) => $tag->getName(), $value);
|
||||
$tags = array_map(fn(Tag $tag) => $tag->name, $value);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
@ -51,7 +51,8 @@ class TagsType extends AbstractType implements DataTransformerInterface
|
||||
$tagEntity = $this->repository->findOneBy(['name' => $tag, 'user' => $user]);
|
||||
if ($tagEntity === null) {
|
||||
$tagEntity = new Tag();
|
||||
$tagEntity->setName($tag)->setUser($user);
|
||||
$tagEntity->name = $tag;
|
||||
$tagEntity->user = $user;
|
||||
|
||||
// Validate the new Tag entity
|
||||
$errors = $this->validator->validate($tagEntity);
|
||||
@ -90,4 +91,4 @@ class TagsType extends AbstractType implements DataTransformerInterface
|
||||
{
|
||||
return TextType::class;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user