placesRepository = $placesRepository; $this->configurationRepository = $configurationRepository; $this->module = $module; } /** * @throws NonUniqueResultException */ public function load(ObjectManager $manager): void { $configuration = $this->configurationRepository->findByModule($this->module->getModule()); $clear = new ClearService(); foreach (self::PLACES as $place) { $entity = new Places(); $entity->setName($place); $entity->setKey($clear->cleanString($place) . '_generickeytest'); $entity->setConfiguration($configuration); $entity->setDefault(false); $this->placesRepository->create($entity); } } public function getDependencies(): array { return [ ConfigurationFixtures::class, ]; } }