Skip to content

Conversation

@mabruchet
Copy link

Fix pagination issue with a generateRedirectFromRoute which it redirect to the customers page when any filter is use.


return $this->render('customers');
$data = $baseForm->getForm()->getData();
$choice = "";
Copy link
Contributor

Choose a reason for hiding this comment

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

Simples quotes pour les strings si pas besoin d'interpréter des variables

&& $choice == 'all'
) {
return $this->generateRedirectFromRoute('admin.customers');
} elseif ($data['company'] === null
Copy link
Contributor

Choose a reason for hiding this comment

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

Tu peux refacto ces 2 parties en faisant par exemple && in_array($choice, ['', 'all']

@mabruchet mabruchet force-pushed the fix/pagination_redirection_to_customers branch from 2434ee8 to 516fb1a Compare March 8, 2018 13:43
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.

2 participants