[COMPONENT][Collection] Make MetaCollectionPlugin a trait and abstract collection delete and name update

This commit is contained in:
2022-01-04 21:58:49 +00:00
parent 754135743e
commit 9df9c6a19c
5 changed files with 28 additions and 15 deletions

View File

@@ -77,4 +77,15 @@ class AttachmentCollections extends MetaCollectionController
{
return DB::findOneBy(AttachmentCollection::class, ['id' => $collection_id]);
}
public function setCollectionName(int $actor_id, string $actor_nickname, AttachmentCollection $collection, string $name)
{
$collection->setName($name);
DB::persist($collection);
}
public function removeCollection(int $actor_id, string $actor_nickname, AttachmentCollection $collection)
{
DB::remove($collection);
}
}