Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redirect path Twig extension #43

Closed
wants to merge 1 commit into from

Conversation

loic425
Copy link
Member

@loic425 loic425 commented Sep 18, 2024

No description provided.

@loic425 loic425 force-pushed the redirect_path_extension branch 4 times, most recently from 92fcfeb to 40a2c58 Compare September 18, 2024 12:26
@loic425 loic425 force-pushed the redirect_path_extension branch 2 times, most recently from 3917f1c to f56bec3 Compare October 2, 2024 12:54
$request->setSession($session);
$container->get('request_stack')->push($request);

$this->redirectPathExtension = $container->get('sylius_twig_extra.twig.extension.redirect_path');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setup is extracted from Sylius Ui Bundle


public function testItReturnsGivenPathIfRouteHasSomeMoreConfiguration(): void
{
$redirectPath = $this->redirectPathExtension->generateRedirectPath('/admin/ajax/products/search');
Copy link
Member Author

@loic425 loic425 Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this test case is extracted from the UIBundle, and I don't understand what's the specificity of this route. I have to ask someone at Sylius to reproduce that kind of route here.

@loic425 loic425 force-pushed the redirect_path_extension branch 5 times, most recently from cd7cc9f to a0777d4 Compare October 4, 2024 07:30
@loic425
Copy link
Member Author

loic425 commented Oct 4, 2024

I think that will be better to implement this TwigExtension on AdminUi.... cause TwigExtra is a more generic package, not related to grid, resource etc...

@loic425
Copy link
Member Author

loic425 commented Oct 4, 2024

Replaced by #87

@loic425 loic425 closed this Oct 4, 2024
@loic425 loic425 deleted the redirect_path_extension branch October 4, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant