getUserContainer()->getRepositoryQuery(); } public function createEntity(string $entityFqcn) { return $this->getUserContainer()->getFactory()->create(); } public function overrideEntitiesActions(?EntityCollection $entities): void { foreach ($entities as $entity) { foreach ($entity->getActions() as $action){ if($action->getName() == ActionDefinition::SWITCH_USER){ $sectionDefault = $this->getSectionContainer()->getStore()->setMerchant($this->getMerchantCurrent())->getOneDefault(); $url = $this->generateUrl($this->getParameter('lc_sov.homepage_route'), array('_switch_user' => $entity->getInstance()->getEmail(), 'section'=> $sectionDefault)); $action->setLinkUrl($url); } } } } }