|
|
@@ -33,15 +33,18 @@ use Symfony\Component\HttpFoundation\Response; |
|
|
|
abstract class UserMerchantAdminController extends AbstractAdminController |
|
|
|
{ |
|
|
|
use AdminControllerTrait; |
|
|
|
|
|
|
|
protected $em; |
|
|
|
protected $translatorAdmin; |
|
|
|
|
|
|
|
public function __construct(EntityManagerInterface $entityManager, TranslatorAdmin $translatorAdmin){ |
|
|
|
public function __construct(EntityManagerInterface $entityManager, TranslatorAdmin $translatorAdmin) |
|
|
|
{ |
|
|
|
$this->em = $entityManager; |
|
|
|
$this->translatorAdmin = $translatorAdmin; |
|
|
|
} |
|
|
|
|
|
|
|
public function overrideEntitiesActions(?EntityCollection $entities){ |
|
|
|
public function overrideEntitiesActions(?EntityCollection $entities): void |
|
|
|
{ |
|
|
|
$context = $this->get(AdminContextProvider::class)->getContext(); |
|
|
|
$adminUrlGenerator = $this->get(AdminUrlGenerator::class); |
|
|
|
|
|
|
@@ -49,7 +52,7 @@ abstract class UserMerchantAdminController extends AbstractAdminController |
|
|
|
$this->em->getEntityName(CreditHistoryInterface::class) |
|
|
|
); |
|
|
|
|
|
|
|
if($entities) { |
|
|
|
if ($entities) { |
|
|
|
foreach ($entities as $entity) { |
|
|
|
foreach ($entity->getActions() as $action) { |
|
|
|
if ($action->getName('credit_history')) { |
|
|
@@ -108,7 +111,6 @@ abstract class UserMerchantAdminController extends AbstractAdminController |
|
|
|
$form->handleRequest($context->getRequest()); |
|
|
|
|
|
|
|
if ($form->isSubmitted() && $form->isValid()) { |
|
|
|
|
|
|
|
$userMerchant = $form->getData(); |
|
|
|
|
|
|
|
$existingUser = $userRepository->findOneByEmail($form->get('email')->getData()); |