{"action":"created","comment":{"url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/comments/51742247","id":51742247,"diff_hunk":"@@ -825,4 +829,62 @@ public function getExtraParameters()\n     {\n         return array();\n     }\n+\n+    /**\n+     * @param $route\n+     * @return $this\n+     */\n+    public function setMoveUpRouteName($route)\n+    {\n+        $this->moveUpRouteName = $route;\n+\n+        return $this;\n+    }\n+\n+    /**\n+     * @param $route\n+     * @return $this\n+     */\n+    public function setMoveDownRouteName($route)\n+    {\n+        $this->moveDownRouteName = $route;\n+\n+        return $this;\n+    }\n+\n+    public function buildWeightAction() {\n+\n+        // Check if sortable is used\n+        if ($sort = $this->getSortableField()) {\n+            $route = function (EntityInterface $item) {\n+                return array(\n+                    'path' => $this->getPathByConvention() . '_move_up',\n+                    'params' => array('id' => $item->getId()),\n+                );\n+            };\n+\n+            $action = new SimpleItemAction($route, 'arrow-up', 'Move up');\n+            $this->addItemAction($action);\n+\n+            $route = function (EntityInterface $item) {\n+                return array(\n+                    'path' => $this->getPathByConvention() . '_move_down',\n+                    'params' => array('id' => $item->getId()),\n+                );\n+            };\n+\n+            $action = new SimpleItemAction($route, 'arrow-down', 'Move down');\n+            $this->addItemAction($action);\n+        }\n+    }\n+\n+    /**\n+     * Returns the name of the field when making entities sortable\n+     *\n+     * @return string\n+     */\n+    public function getSortableField() {\n+","path":"src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractAdminListConfigurator.php","position":302,"original_position":302,"commit_id":"e2a2004214ac39567ccff8cc4f72f63036d63158","original_commit_id":"e2a2004214ac39567ccff8cc4f72f63036d63158","user":{"login":"jockri","id":517574,"avatar_url":"https://avatars.githubusercontent.com/u/517574?v=3","gravatar_id":"","url":"https://api.github.com/users/jockri","html_url":"https://github.com/jockri","followers_url":"https://api.github.com/users/jockri/followers","following_url":"https://api.github.com/users/jockri/following{/other_user}","gists_url":"https://api.github.com/users/jockri/gists{/gist_id}","starred_url":"https://api.github.com/users/jockri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jockri/subscriptions","organizations_url":"https://api.github.com/users/jockri/orgs","repos_url":"https://api.github.com/users/jockri/repos","events_url":"https://api.github.com/users/jockri/events{/privacy}","received_events_url":"https://api.github.com/users/jockri/received_events","type":"User","site_admin":false},"body":"I would return null to make this more explicit","created_at":"2016-02-03T16:07:55Z","updated_at":"2016-02-03T16:07:55Z","html_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/972#discussion_r51742247","pull_request_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/972","_links":{"self":{"href":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/comments/51742247"},"html":{"href":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/972#discussion_r51742247"},"pull_request":{"href":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/972"}}},"pull_request":{"url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/972","id":58107231,"html_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/972","diff_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/972.diff","patch_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/972.patch","issue_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/972","number":972,"state":"open","locked":false,"title":"[AdminListBundle, GeneratorBundle] add sortable trait to entities","user":{"login":"sandergo90","id":1516413,"avatar_url":"https://avatars.githubusercontent.com/u/1516413?v=3","gravatar_id":"","url":"https://api.github.com/users/sandergo90","html_url":"https://github.com/sandergo90","followers_url":"https://api.github.com/users/sandergo90/followers","following_url":"https://api.github.com/users/sandergo90/following{/other_user}","gists_url":"https://api.github.com/users/sandergo90/gists{/gist_id}","starred_url":"https://api.github.com/users/sandergo90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandergo90/subscriptions","organizations_url":"https://api.github.com/users/sandergo90/orgs","repos_url":"https://api.github.com/users/sandergo90/repos","events_url":"https://api.github.com/users/sandergo90/events{/privacy}","received_events_url":"https://api.github.com/users/sandergo90/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? |no\r\n| Fixed tickets | #875  ","created_at":"2016-02-03T08:50:15Z","updated_at":"2016-02-03T16:07:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b100f02a20bd2ae643ba1a082f5acb842a3925df","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/972/commits","review_comments_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/972/comments","review_comment_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/972/comments","statuses_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/statuses/e2a2004214ac39567ccff8cc4f72f63036d63158","head":{"label":"sandergo90:issue#875","ref":"issue#875","sha":"e2a2004214ac39567ccff8cc4f72f63036d63158","user":{"login":"sandergo90","id":1516413,"avatar_url":"https://avatars.githubusercontent.com/u/1516413?v=3","gravatar_id":"","url":"https://api.github.com/users/sandergo90","html_url":"https://github.com/sandergo90","followers_url":"https://api.github.com/users/sandergo90/followers","following_url":"https://api.github.com/users/sandergo90/following{/other_user}","gists_url":"https://api.github.com/users/sandergo90/gists{/gist_id}","starred_url":"https://api.github.com/users/sandergo90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandergo90/subscriptions","organizations_url":"https://api.github.com/users/sandergo90/orgs","repos_url":"https://api.github.com/users/sandergo90/repos","events_url":"https://api.github.com/users/sandergo90/events{/privacy}","received_events_url":"https://api.github.com/users/sandergo90/received_events","type":"User","site_admin":false},"repo":{"id":49947119,"name":"KunstmaanBundlesCMS","full_name":"sandergo90/KunstmaanBundlesCMS","owner":{"login":"sandergo90","id":1516413,"avatar_url":"https://avatars.githubusercontent.com/u/1516413?v=3","gravatar_id":"","url":"https://api.github.com/users/sandergo90","html_url":"https://github.com/sandergo90","followers_url":"https://api.github.com/users/sandergo90/followers","following_url":"https://api.github.com/users/sandergo90/following{/other_user}","gists_url":"https://api.github.com/users/sandergo90/gists{/gist_id}","starred_url":"https://api.github.com/users/sandergo90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandergo90/subscriptions","organizations_url":"https://api.github.com/users/sandergo90/orgs","repos_url":"https://api.github.com/users/sandergo90/repos","events_url":"https://api.github.com/users/sandergo90/events{/privacy}","received_events_url":"https://api.github.com/users/sandergo90/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sandergo90/KunstmaanBundlesCMS","description":"An advanced yet user-friendly content management system, based on the full stack Symfony2 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.","fork":true,"url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS","forks_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/forks","keys_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/teams","hooks_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/hooks","issue_events_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/issues/events{/number}","events_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/events","assignees_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/assignees{/user}","branches_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/branches{/branch}","tags_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/tags","blobs_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/statuses/{sha}","languages_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/languages","stargazers_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/stargazers","contributors_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/contributors","subscribers_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/subscribers","subscription_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/subscription","commits_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/contents/{+path}","compare_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/merges","archive_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/downloads","issues_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/issues{/number}","pulls_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/pulls{/number}","milestones_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/milestones{/number}","notifications_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/labels{/name}","releases_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/releases{/id}","deployments_url":"https://api.github.com/repos/sandergo90/KunstmaanBundlesCMS/deployments","created_at":"2016-01-19T11:06:41Z","updated_at":"2016-01-19T11:06:45Z","pushed_at":"2016-02-03T11:51:49Z","git_url":"git://github.com/sandergo90/KunstmaanBundlesCMS.git","ssh_url":"git@github.com:sandergo90/KunstmaanBundlesCMS.git","clone_url":"https://github.com/sandergo90/KunstmaanBundlesCMS.git","svn_url":"https://github.com/sandergo90/KunstmaanBundlesCMS","homepage":"https://bundles.kunstmaan.be","size":38937,"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":"Kunstmaan:master","ref":"master","sha":"6064b2b59e9c221ff991480167bb9dc4af8d6a6c","user":{"login":"Kunstmaan","id":441259,"avatar_url":"https://avatars.githubusercontent.com/u/441259?v=3","gravatar_id":"","url":"https://api.github.com/users/Kunstmaan","html_url":"https://github.com/Kunstmaan","followers_url":"https://api.github.com/users/Kunstmaan/followers","following_url":"https://api.github.com/users/Kunstmaan/following{/other_user}","gists_url":"https://api.github.com/users/Kunstmaan/gists{/gist_id}","starred_url":"https://api.github.com/users/Kunstmaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kunstmaan/subscriptions","organizations_url":"https://api.github.com/users/Kunstmaan/orgs","repos_url":"https://api.github.com/users/Kunstmaan/repos","events_url":"https://api.github.com/users/Kunstmaan/events{/privacy}","received_events_url":"https://api.github.com/users/Kunstmaan/received_events","type":"Organization","site_admin":false},"repo":{"id":22946859,"name":"KunstmaanBundlesCMS","full_name":"Kunstmaan/KunstmaanBundlesCMS","owner":{"login":"Kunstmaan","id":441259,"avatar_url":"https://avatars.githubusercontent.com/u/441259?v=3","gravatar_id":"","url":"https://api.github.com/users/Kunstmaan","html_url":"https://github.com/Kunstmaan","followers_url":"https://api.github.com/users/Kunstmaan/followers","following_url":"https://api.github.com/users/Kunstmaan/following{/other_user}","gists_url":"https://api.github.com/users/Kunstmaan/gists{/gist_id}","starred_url":"https://api.github.com/users/Kunstmaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kunstmaan/subscriptions","organizations_url":"https://api.github.com/users/Kunstmaan/orgs","repos_url":"https://api.github.com/users/Kunstmaan/repos","events_url":"https://api.github.com/users/Kunstmaan/events{/privacy}","received_events_url":"https://api.github.com/users/Kunstmaan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS","description":"An advanced yet user-friendly content management system, based on the full stack Symfony2 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.","fork":false,"url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS","forks_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/forks","keys_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/teams","hooks_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/hooks","issue_events_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/events{/number}","events_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/events","assignees_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/assignees{/user}","branches_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/branches{/branch}","tags_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/tags","blobs_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/statuses/{sha}","languages_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/languages","stargazers_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/stargazers","contributors_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/contributors","subscribers_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/subscribers","subscription_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/subscription","commits_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/contents/{+path}","compare_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/merges","archive_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/downloads","issues_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues{/number}","pulls_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls{/number}","milestones_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/milestones{/number}","notifications_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/labels{/name}","releases_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/releases{/id}","deployments_url":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/deployments","created_at":"2014-08-14T08:32:55Z","updated_at":"2016-02-03T13:33:34Z","pushed_at":"2016-02-03T12:29:43Z","git_url":"git://github.com/Kunstmaan/KunstmaanBundlesCMS.git","ssh_url":"git@github.com:Kunstmaan/KunstmaanBundlesCMS.git","clone_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS.git","svn_url":"https://github.com/Kunstmaan/KunstmaanBundlesCMS","homepage":"https://bundles.kunstmaan.be","size":42801,"stargazers_count":127,"watchers_count":127,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":98,"mirror_url":null,"open_issues_count":97,"forks":98,"open_issues":97,"watchers":127,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/972"},"html":{"href":"https://github.com/Kunstmaan/KunstmaanBundlesCMS/pull/972"},"issue":{"href":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/972"},"comments":{"href":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/issues/972/comments"},"review_comments":{"href":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/972/comments"},"review_comment":{"href":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/pulls/972/commits"},"statuses":{"href":"https://api.github.com/repos/Kunstmaan/KunstmaanBundlesCMS/statuses/e2a2004214ac39567ccff8cc4f72f63036d63158"}}}}