Jump to content

How to add new variable to "twig return"?


Aircod
 Share

Recommended Posts

Hello.

I would like to add a new variable to the return twig in /src/PrestaShopBundle/Controller/Admin/Sell/Customer How can I do this with a module?

I am interested in a fragment of this code: 

return $this->render('@PrestaShop/Admin/Sell/Customer/view.html.twig', [
            
            'enableSidebar' => true,
            'help_link' => $this->generateSidebarLink($request->attributes->get('_legacy_controller')),
            'customerInformation' => $customerInformation,
            'isMultistoreEnabled' => $this->get('prestashop.adapter.feature.multistore')->isActive(),
            'transferGuestAccountForm' => $transferGuestAccountForm,
            'privateNoteForm' => $privateNoteForm->createView(),
        ]);

I don't want to overwrite the controller.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More