API endpoints to delete customer/project/activity (#5181)
* added service methods with events to delete customer, project, activity * added API endpoints to delete customer, project, activity * added tests for new API endpoints
This commit is contained in:
@@ -15,6 +15,7 @@ use App\Entity\Project;
|
||||
use App\Event\ProjectCreateEvent;
|
||||
use App\Event\ProjectCreatePostEvent;
|
||||
use App\Event\ProjectCreatePreEvent;
|
||||
use App\Event\ProjectDeleteEvent;
|
||||
use App\Event\ProjectMetaDefinitionEvent;
|
||||
use App\Event\ProjectUpdatePostEvent;
|
||||
use App\Event\ProjectUpdatePreEvent;
|
||||
@@ -77,8 +78,13 @@ final class ProjectService
|
||||
return $project;
|
||||
}
|
||||
|
||||
public function deleteProject(Project $project): void
|
||||
{
|
||||
$this->dispatcher->dispatch(new ProjectDeleteEvent($project));
|
||||
$this->repository->deleteProject($project);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Project $project
|
||||
* @param string[] $groups
|
||||
* @throws ValidationFailedException
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user