{"action":"created","comment":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/49276765","id":49276765,"diff_hunk":"@@ -0,0 +1,212 @@\n+How to Customize the Main Menu\n+==============================\n+\n+By default the main menu of the backend displays the list of the managed\n+entities in the same order they were defined in the configuration. The menu\n+items point to the `list` view of each entity.\n+\n+This behavior is too limited for complex backends, which need to define custom\n+labels, icons or links for each menu item. In addition, complex backends usually\n+manage lots of entities, which should be displayed in submenus.\n+\n+In this article you'll learn all the different ways supported by EasyAdmin to\n+create a custom navigation menu for your backend.\n+\n+Reordering Menu Items\n+---------------------\n+\n+The easiest way to reorder the menu items is to reorder the contents of the\n+`entities` option in the EasyAdmin configuration file. However, sometimes the\n+configuration file is too complex or its contents are scattered into several\n+files. In those cases, it's easier to use the `menu` option to reorder the menu\n+items just by defining the names of the entities:\n+\n+```\n+easy_admin:\n+    menu: ['User', 'Product', 'Category']\n+    # ...\n+    entities:\n+        User:\n+            # ...\n+        Product:\n+            # ...\n+        Category:\n+            # ...\n+```\n+\n+Customizing the Labels and Icons of the Menu Items\n+--------------------------------------------------\n+\n+Use the expanded configuration format to define the label and/or icon of any or\n+all the menu items:\n+\n+```yaml\n+easy_admin:\n+    menu:\n+        - { entity: 'User', label: 'Users', icon: 'user' }","path":"Resources/doc/tutorials/custom-menu.md","position":46,"original_position":46,"commit_id":"f54c351d01f0745dc53079a5dcb9bfb737e71019","original_commit_id":"f54c351d01f0745dc53079a5dcb9bfb737e71019","user":{"login":"Pierstoval","id":3369266,"avatar_url":"https://avatars.githubusercontent.com/u/3369266?v=3","gravatar_id":"","url":"https://api.github.com/users/Pierstoval","html_url":"https://github.com/Pierstoval","followers_url":"https://api.github.com/users/Pierstoval/followers","following_url":"https://api.github.com/users/Pierstoval/following{/other_user}","gists_url":"https://api.github.com/users/Pierstoval/gists{/gist_id}","starred_url":"https://api.github.com/users/Pierstoval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pierstoval/subscriptions","organizations_url":"https://api.github.com/users/Pierstoval/orgs","repos_url":"https://api.github.com/users/Pierstoval/repos","events_url":"https://api.github.com/users/Pierstoval/events{/privacy}","received_events_url":"https://api.github.com/users/Pierstoval/received_events","type":"User","site_admin":false},"body":"I'd say **yes** because menu label should be different than list/form/show labels sometimes.","created_at":"2016-01-10T14:54:40Z","updated_at":"2016-01-10T14:54:40Z","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/784#discussion_r49276765","pull_request_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/784","_links":{"self":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments/49276765"},"html":{"href":"https://github.com/javiereguiluz/EasyAdminBundle/pull/784#discussion_r49276765"},"pull_request":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/784"}}},"pull_request":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/784","id":55546432,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/784","diff_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/784.diff","patch_url":"https://github.com/javiereguiluz/EasyAdminBundle/pull/784.patch","issue_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/784","number":784,"state":"open","locked":false,"title":"Added a new tutorial about creating custom menus","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"body":"**VERY IMPORTANT**: this article explains a feature that DOESN'T EXIST YET in EasyAdmin. Don't try to use this feature. It won't work!\r\n\r\n---\r\n\r\nFollowing our \"DDD tradition\" (*Documentation-Driven Development*), I've created a tutorial for an imaginary feature that allows to define custom menus. For all those developers that need this feature, please add your comments and try to reply to these questions\r\n\r\n  * If this feature was real, would it solve your menu-related needs?\r\n    * If yes, could we simplify it?\r\n    * If no, what does it lack?\r\n  * Do you know any good-practice related to menus that we could import from other projects (KnpMenuBundle, Sonata, ...) or technologies (Django, Rails, ...)?\r\n\r\nThanks!","created_at":"2016-01-09T17:13:58Z","updated_at":"2016-01-10T14:54:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3ec56bc04dfd856e7239145fb5149f11b553a81","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/784/commits","review_comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/784/comments","review_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/784/comments","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/f54c351d01f0745dc53079a5dcb9bfb737e71019","head":{"label":"javiereguiluz:doc_menu","ref":"doc_menu","sha":"f54c351d01f0745dc53079a5dcb9bfb737e71019","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"repo":{"id":29126334,"name":"EasyAdminBundle","full_name":"javiereguiluz/EasyAdminBundle","owner":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle","description":"The new (and simple) admin generator for Symfony applications.","fork":false,"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle","forks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/forks","keys_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/teams","hooks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/events","assignees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/tags","blobs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/languages","stargazers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscription","commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/merges","archive_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/downloads","issues_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/releases{/id}","created_at":"2015-01-12T08:43:02Z","updated_at":"2016-01-10T12:11:02Z","pushed_at":"2016-01-10T09:14:41Z","git_url":"git://github.com/javiereguiluz/EasyAdminBundle.git","ssh_url":"git@github.com:javiereguiluz/EasyAdminBundle.git","clone_url":"https://github.com/javiereguiluz/EasyAdminBundle.git","svn_url":"https://github.com/javiereguiluz/EasyAdminBundle","homepage":"","size":6287,"stargazers_count":738,"watchers_count":738,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":117,"mirror_url":null,"open_issues_count":62,"forks":117,"open_issues":62,"watchers":738,"default_branch":"master"}},"base":{"label":"javiereguiluz:master","ref":"master","sha":"113aca30bfaabde9596d975f286a31ad3025c7b3","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"repo":{"id":29126334,"name":"EasyAdminBundle","full_name":"javiereguiluz/EasyAdminBundle","owner":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javiereguiluz/EasyAdminBundle","description":"The new (and simple) admin generator for Symfony applications.","fork":false,"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle","forks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/forks","keys_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/teams","hooks_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/hooks","issue_events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/events{/number}","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/events","assignees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/assignees{/user}","branches_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/branches{/branch}","tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/tags","blobs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/languages","stargazers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/stargazers","contributors_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contributors","subscribers_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscribers","subscription_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/subscription","commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/contents/{+path}","compare_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/merges","archive_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/downloads","issues_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues{/number}","pulls_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/labels{/name}","releases_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/releases{/id}","created_at":"2015-01-12T08:43:02Z","updated_at":"2016-01-10T12:11:02Z","pushed_at":"2016-01-10T09:14:41Z","git_url":"git://github.com/javiereguiluz/EasyAdminBundle.git","ssh_url":"git@github.com:javiereguiluz/EasyAdminBundle.git","clone_url":"https://github.com/javiereguiluz/EasyAdminBundle.git","svn_url":"https://github.com/javiereguiluz/EasyAdminBundle","homepage":"","size":6287,"stargazers_count":738,"watchers_count":738,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":117,"mirror_url":null,"open_issues_count":62,"forks":117,"open_issues":62,"watchers":738,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/784"},"html":{"href":"https://github.com/javiereguiluz/EasyAdminBundle/pull/784"},"issue":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/784"},"comments":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/784/comments"},"review_comments":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/784/comments"},"review_comment":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/pulls/784/commits"},"statuses":{"href":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/statuses/f54c351d01f0745dc53079a5dcb9bfb737e71019"}}}}