Kunstmaan / KunstmaanBundlesCMS

An advanced yet user-friendly content management system, based on the full stack Symfony framework combined with a whole host of community bundles. It provides a full featured, multi-language CMS system with an innovative page and form assembling process, versioning, workflow, translation and media managers and much more.

Home Page:https://kunstmaancms.be

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ChooserController::chooserShowFolderAction() with custom twig view

delboy1978uk opened this issue · comments

Hi guys!

ChooserController::chooserShowFolderAction() used to return an array of $viewVars, and now it returns a response.

The current project I am upgrading was adding a pager to the view vars and using a custom twig template. Even although we can use the different view, there is no way to add our pager to the vars being passed to twig.

How would you feel about adding in an additional parameter with a default empty array? This would fix our issue.

public function chooserShowFolderAction(Request $request, $folderId, array $customViewVars = []): Response

And the in the method body:

$viewVars = [
            // existing vars ,
           ...$customViewVars
        ];