params = $params; $this->httpClient = $httpClient; $this->requestStack = $requestStack; $this->transitionRepository = $transitionRepository; $this->placeQuery = $placeQuery; $this->module = $module; $this->projectRepository = $projectRepository; } /** * @throws NonUniqueResultException */ public function firstPlace(array $projectId, int $idConfig): bool { if ($idConfig) { $keyTransition = $this->transitionRepository->findFirstTransition($idConfig, $this->module->getModule()); $transition = $this->transitionRepository->findByKey($keyTransition['keyInternal']); $update = $this->projectRepository->attachWorkflow(implode(',', $projectId), $idConfig, $transition->getStartPlace()->getKey()); } else { $update = $this->projectRepository->detachWorkflow(implode(',', $projectId)); } return $update; } }