PUGXMultiUserBundle icon indicating copy to clipboard operation
PUGXMultiUserBundle copied to clipboard

Passing custom parameters to the template

Open anthony-bernardo opened this issue 11 years ago • 7 comments

Hi,

I want simply pass to the registration template, somes custom variables, but I don't know how to do !

Here the code of the controller :

/**
 * @Route("/register", name="company_registration")
 */
public function registrationCompanyAction(Request $request)
{

     return $this->container
        ->get('pugx_multi_user.registration_manager')
        ->register('AppBundle\Entity\Company');

}

Where can I do ?

Thank you !

anthony-bernardo avatar Dec 25 '14 16:12 anthony-bernardo

There is a solution in an old (closed) issue. https://github.com/PUGX/PUGXMultiUserBundle/issues/35. Sadly it requires you to patch the core file RegistrationManager.php.

I would like to see this feature in the official repo too!

greg-man avatar Jul 21 '15 12:07 greg-man

@greg-man feel free to do a PR ;-)

leopro avatar Jul 21 '15 13:07 leopro

If I only knew how ... :-)

greg-man avatar Jul 21 '15 14:07 greg-man

Finally I tried, but the commit didn't pass the tests. I don't have an experience n unit testing so what can I do?

greg-man avatar Jul 21 '15 20:07 greg-man

Tests are failing only on php 5.3 for a reason that tbh I don't know. I'm investigating.

Anyway have a look on my last comment here https://github.com/PUGX/PUGXMultiUserBundle/pull/90#issuecomment-123651641

leopro avatar Jul 22 '15 10:07 leopro

Ok fixed.

leopro avatar Jul 22 '15 14:07 leopro

Did you really fixed it ? Master does not seem to embedded the new feature.

gelhaimer avatar Mar 21 '16 18:03 gelhaimer