{"action":"created","comment":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments/61282864","id":61282864,"diff_hunk":"@@ -306,6 +306,51 @@ inherit it :\n     <?php\n     $menu->setExtra('translation_domain', 'My domain');\n \n+Filter parameters\n+^^^^^^^^^^^^^^^^^\n+\n+You can add or override filter parameters to the Tab Menu:\n+\n+.. code-block:: php\n+\n+    <?php\n+\n+    use Sonata\\AdminBundle\\Admin\\Admin;\n+    use Sonata\\AdminBundle\\Admin\\AdminInterface;\n+    use Knp\\Menu\\ItemInterface as MenuItemInterface;\n+    use Sonata\\CoreBundle\\Form\\Type\\EqualType;\n+\n+    class DeliveryAdmin extends Admin\n+    {\n+        protected function configureTabMenu(MenuItemInterface $menu, $action, AdminInterface $childAdmin = null)\n+        {\n+            if (!$childAdmin && !in_array($action, array('edit', 'show', 'list'))) {\n+                return;\n+            }\n+\n+            if ($action == 'list') {\n+                // Get current filter parameters\n+                $filterParameters = $this->getFilterParameters();\n+\n+                // Add or override filter parameters\n+                $filterParameters['status'] = array(\n+                    'type'  => EqualType::TYPE_IS_EQUAL, // => 1\n+                    'value' => Delivery::STATUS_OPEN,\n+                );\n+\n+                // Add filters to uri of tab\n+                $menu->addChild('List open deliveries', array(^'uri' => $this->generateUrl('list', array(","path":"Resources/doc/reference/advanced_configuration.rst","position":37,"original_position":37,"commit_id":"b37680628c12fc1e2b55ff1922b773da1d3df82a","original_commit_id":"b37680628c12fc1e2b55ff1922b773da1d3df82a","user":{"login":"Soullivaneuh","id":1698357,"avatar_url":"https://avatars.githubusercontent.com/u/1698357?v=3","gravatar_id":"","url":"https://api.github.com/users/Soullivaneuh","html_url":"https://github.com/Soullivaneuh","followers_url":"https://api.github.com/users/Soullivaneuh/followers","following_url":"https://api.github.com/users/Soullivaneuh/following{/other_user}","gists_url":"https://api.github.com/users/Soullivaneuh/gists{/gist_id}","starred_url":"https://api.github.com/users/Soullivaneuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soullivaneuh/subscriptions","organizations_url":"https://api.github.com/users/Soullivaneuh/orgs","repos_url":"https://api.github.com/users/Soullivaneuh/repos","events_url":"https://api.github.com/users/Soullivaneuh/events{/privacy}","received_events_url":"https://api.github.com/users/Soullivaneuh/received_events","type":"User","site_admin":false},"body":"I don't think so. :-)","created_at":"2016-04-27T15:45:00Z","updated_at":"2016-04-27T15:45:00Z","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/3743#discussion_r61282864","pull_request_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/3743","_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments/61282864"},"html":{"href":"https://github.com/sonata-project/SonataAdminBundle/pull/3743#discussion_r61282864"},"pull_request":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/3743"}}},"pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/3743","id":68023950,"html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/3743","diff_url":"https://github.com/sonata-project/SonataAdminBundle/pull/3743.diff","patch_url":"https://github.com/sonata-project/SonataAdminBundle/pull/3743.patch","issue_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/3743","number":3743,"state":"open","locked":false,"title":"Add how to add filters to tab menu example see issue","user":{"login":"OskarStark","id":995707,"avatar_url":"https://avatars.githubusercontent.com/u/995707?v=3","gravatar_id":"","url":"https://api.github.com/users/OskarStark","html_url":"https://github.com/OskarStark","followers_url":"https://api.github.com/users/OskarStark/followers","following_url":"https://api.github.com/users/OskarStark/following{/other_user}","gists_url":"https://api.github.com/users/OskarStark/gists{/gist_id}","starred_url":"https://api.github.com/users/OskarStark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OskarStark/subscriptions","organizations_url":"https://api.github.com/users/OskarStark/orgs","repos_url":"https://api.github.com/users/OskarStark/repos","events_url":"https://api.github.com/users/OskarStark/events{/privacy}","received_events_url":"https://api.github.com/users/OskarStark/received_events","type":"User","site_admin":false},"body":"Fixes #2607\r\nFixes #2807 \r\n\r\nI applied your comments from #2807 @Soullivaneuh and moved the doc block to the correct section.\r\nI kept the commit of @webdevilopers \r\n\r\n@greg0ire @core23 @Soullivaneuh , can someone please merge this?\r\n","created_at":"2016-04-27T09:40:13Z","updated_at":"2016-04-27T15:45:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"116c333349c246da6894cf0ebae5216d84217ed3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/3743/commits","review_comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/3743/comments","review_comment_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/3743/comments","statuses_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/statuses/b37680628c12fc1e2b55ff1922b773da1d3df82a","head":{"label":"OskarStark:webdevilopers-patch-1","ref":"webdevilopers-patch-1","sha":"b37680628c12fc1e2b55ff1922b773da1d3df82a","user":{"login":"OskarStark","id":995707,"avatar_url":"https://avatars.githubusercontent.com/u/995707?v=3","gravatar_id":"","url":"https://api.github.com/users/OskarStark","html_url":"https://github.com/OskarStark","followers_url":"https://api.github.com/users/OskarStark/followers","following_url":"https://api.github.com/users/OskarStark/following{/other_user}","gists_url":"https://api.github.com/users/OskarStark/gists{/gist_id}","starred_url":"https://api.github.com/users/OskarStark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OskarStark/subscriptions","organizations_url":"https://api.github.com/users/OskarStark/orgs","repos_url":"https://api.github.com/users/OskarStark/repos","events_url":"https://api.github.com/users/OskarStark/events{/privacy}","received_events_url":"https://api.github.com/users/OskarStark/received_events","type":"User","site_admin":false},"repo":{"id":26215396,"name":"SonataAdminBundle","full_name":"OskarStark/SonataAdminBundle","owner":{"login":"OskarStark","id":995707,"avatar_url":"https://avatars.githubusercontent.com/u/995707?v=3","gravatar_id":"","url":"https://api.github.com/users/OskarStark","html_url":"https://github.com/OskarStark","followers_url":"https://api.github.com/users/OskarStark/followers","following_url":"https://api.github.com/users/OskarStark/following{/other_user}","gists_url":"https://api.github.com/users/OskarStark/gists{/gist_id}","starred_url":"https://api.github.com/users/OskarStark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OskarStark/subscriptions","organizations_url":"https://api.github.com/users/OskarStark/orgs","repos_url":"https://api.github.com/users/OskarStark/repos","events_url":"https://api.github.com/users/OskarStark/events{/privacy}","received_events_url":"https://api.github.com/users/OskarStark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OskarStark/SonataAdminBundle","description":"AdminBundle - The missing Symfony2 Admin Generator","fork":true,"url":"https://api.github.com/repos/OskarStark/SonataAdminBundle","forks_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/forks","keys_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/teams","hooks_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/events","assignees_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/tags","blobs_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/languages","stargazers_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/subscription","commits_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/merges","archive_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/downloads","issues_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/releases{/id}","deployments_url":"https://api.github.com/repos/OskarStark/SonataAdminBundle/deployments","created_at":"2014-11-05T10:51:39Z","updated_at":"2016-01-18T07:24:54Z","pushed_at":"2016-04-27T09:50:27Z","git_url":"git://github.com/OskarStark/SonataAdminBundle.git","ssh_url":"git@github.com:OskarStark/SonataAdminBundle.git","clone_url":"https://github.com/OskarStark/SonataAdminBundle.git","svn_url":"https://github.com/OskarStark/SonataAdminBundle","homepage":"http://sonata-project.org/bundles/admin","size":17552,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sonata-project:master","ref":"master","sha":"88e9451ccbd267b51efddba92712268c0489ea0d","user":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"repo":{"id":1095228,"name":"SonataAdminBundle","full_name":"sonata-project/SonataAdminBundle","owner":{"login":"sonata-project","id":404157,"avatar_url":"https://avatars.githubusercontent.com/u/404157?v=3","gravatar_id":"","url":"https://api.github.com/users/sonata-project","html_url":"https://github.com/sonata-project","followers_url":"https://api.github.com/users/sonata-project/followers","following_url":"https://api.github.com/users/sonata-project/following{/other_user}","gists_url":"https://api.github.com/users/sonata-project/gists{/gist_id}","starred_url":"https://api.github.com/users/sonata-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonata-project/subscriptions","organizations_url":"https://api.github.com/users/sonata-project/orgs","repos_url":"https://api.github.com/users/sonata-project/repos","events_url":"https://api.github.com/users/sonata-project/events{/privacy}","received_events_url":"https://api.github.com/users/sonata-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sonata-project/SonataAdminBundle","description":"AdminBundle - The missing Symfony2 Admin Generator","fork":false,"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle","forks_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/forks","keys_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/teams","hooks_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/events","assignees_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/tags","blobs_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/languages","stargazers_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/subscription","commits_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/merges","archive_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/downloads","issues_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/releases{/id}","deployments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/deployments","created_at":"2010-11-19T17:08:52Z","updated_at":"2016-04-27T12:03:40Z","pushed_at":"2016-04-27T09:50:28Z","git_url":"git://github.com/sonata-project/SonataAdminBundle.git","ssh_url":"git@github.com:sonata-project/SonataAdminBundle.git","clone_url":"https://github.com/sonata-project/SonataAdminBundle.git","svn_url":"https://github.com/sonata-project/SonataAdminBundle","homepage":"http://sonata-project.org/bundles/admin","size":21717,"stargazers_count":1361,"watchers_count":1361,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":964,"mirror_url":null,"open_issues_count":422,"forks":964,"open_issues":422,"watchers":1361,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/3743"},"html":{"href":"https://github.com/sonata-project/SonataAdminBundle/pull/3743"},"issue":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/3743"},"comments":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/3743/comments"},"review_comments":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/3743/comments"},"review_comment":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/3743/commits"},"statuses":{"href":"https://api.github.com/repos/sonata-project/SonataAdminBundle/statuses/b37680628c12fc1e2b55ff1922b773da1d3df82a"}}}}