entityManager = $entityManager; $this->user = $user; $this->acl = $acl; $this->aclManager = $aclManager; $this->metadata = $metadata; $this->config = $config; $this->fieldManagerUtil = $fieldManagerUtil; $this->injectableFactory = $injectableFactory; $this->classFinder = $classFinder; } public function create(string $entityType, ?User $user = null) : BaseSelectManager { $className = $this->classFinder->find('SelectManagers', $entityType); if (!$className || !class_exists($className)) { $className = $this->baseClassName; } if ($user) { $acl = $this->aclManager->createUserAcl($user); } else { $acl = $this->acl; $user = $this->user; } $selectManager = new $className( $this->entityManager, $user, $acl, $this->aclManager, $this->metadata, $this->config, $this->fieldManagerUtil, $this->injectableFactory ); $selectManager->setEntityType($entityType); return $selectManager; } }