{"action":"created","issue":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4034","repository_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle","labels_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4034/labels{/name}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4034/comments","events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4034/events","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4034","id":168661458,"number":4034,"title":"Configuration to change breadcrumb uri for child admin","user":{"login":"cassianotartari","id":3017642,"avatar_url":"https://avatars.githubusercontent.com/u/3017642?v=3","gravatar_id":"","url":"https://api.github.com/users/cassianotartari","html_url":"https://github.com/cassianotartari","followers_url":"https://api.github.com/users/cassianotartari/followers","following_url":"https://api.github.com/users/cassianotartari/following{/other_user}","gists_url":"https://api.github.com/users/cassianotartari/gists{/gist_id}","starred_url":"https://api.github.com/users/cassianotartari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cassianotartari/subscriptions","organizations_url":"https://api.github.com/users/cassianotartari/orgs","repos_url":"https://api.github.com/users/cassianotartari/repos","events_url":"https://api.github.com/users/cassianotartari/events{/privacy}","received_events_url":"https://api.github.com/users/cassianotartari/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/labels/review%20required","name":"review required","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2016-08-01T14:37:08Z","updated_at":"2016-08-01T18:42:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/4034","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4034","diff_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4034.diff","patch_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4034.patch"},"body":"<!-- THE PR TEMPLATE IS NOT AN OPTION. DO NOT DELETE IT! -->\r\n\r\n<!--\r\n    Show us you choose the right branch.\r\n    Different branches are used for different things :\r\n    - 3.x is for everything backwards compatible, like patches, features and deprecation notices\r\n    - master is for deprecation removals and other changes that cannot be done without a BC-break\r\n    More details here: https://github.com/sonata-project/SonataAdminBundle/blob/3.x/CONTRIBUTING.md#the-base-branch\r\n-->\r\nI am targetting this branch, because I would like to change default edit route in the breadcrumb for child admins.\r\n\r\n<!--\r\n    Specify which issues will be fixed/closed.\r\n    Remove it if this is not related.\r\n-->\r\n\r\nCloses #4030\r\n\r\n## Changelog\r\n\r\n<!-- MANDATORY\r\n    Fill the changelog part inside the code block.\r\n    Follow this schema: http://keepachangelog.com/\r\n-->\r\n\r\n<!-- REMOVE EMPTY SECTIONS -->\r\n```markdown\r\n### Added\r\n- Some docs first\r\n\r\n```\r\n\r\n## To do\r\n\r\n<!--\r\n    If this is a work in progress, COMPLETE and ADD needed tasks.\r\n    You can add as many tasks as you want.\r\n    If some are not relevant, just REMOVE them.\r\n-->\r\n\r\n- [x] Update the documentation\r\n- [x] Update code\r\n- [ ] Update the tests\r\n\r\n## Subject\r\n\r\nThere is no way to change breadcrumb object link under a child admin. The idea is give a global option to choose another route beyond edit"},"comment":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/comments/236669242","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/4034#issuecomment-236669242","issue_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/4034","id":236669242,"user":{"login":"greg0ire","id":657779,"avatar_url":"https://avatars.githubusercontent.com/u/657779?v=3","gravatar_id":"","url":"https://api.github.com/users/greg0ire","html_url":"https://github.com/greg0ire","followers_url":"https://api.github.com/users/greg0ire/followers","following_url":"https://api.github.com/users/greg0ire/following{/other_user}","gists_url":"https://api.github.com/users/greg0ire/gists{/gist_id}","starred_url":"https://api.github.com/users/greg0ire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg0ire/subscriptions","organizations_url":"https://api.github.com/users/greg0ire/orgs","repos_url":"https://api.github.com/users/greg0ire/repos","events_url":"https://api.github.com/users/greg0ire/events{/privacy}","received_events_url":"https://api.github.com/users/greg0ire/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T18:42:35Z","updated_at":"2016-08-01T18:42:35Z","body":"Fixed! Try this : \r\n\r\n```\r\n        $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');\r\n        $container->expects($this->once())\r\n            ->method('getParameter')\r\n            ->with('sonata.admin.configuration.breadcrumbs')\r\n            ->will($this->returnValue(array()));\r\n\r\n        $pool = $this->getMockBuilder('Sonata\\AdminBundle\\Admin\\Pool')\r\n            ->disableOriginalConstructor()\r\n            ->getMock();\r\n        $pool->expects($this->once())\r\n            ->method('getContainer')\r\n            ->will($this->returnValue($container));\r\n\r\n        $admin = $this->getMockForAbstractClass('Sonata\\AdminBundle\\Admin\\AbstractAdmin', array(\r\n            'admin.my_code', 'My\\Class', 'MyBundle:ClassAdmin',\r\n        ), '', true, true, true, ['getConfigurationPool']);\r\n        $admin->expects($this->once())\r\n            ->method('getConfigurationPool')\r\n            ->will($this->returnValue($pool));\r\n\r\n        $this->assertInstanceOf(\r\n            'Sonata\\AdminBundle\\Admin\\BreadcrumbsBuilder',\r\n            $admin->getBreadcrumbsBuilder()\r\n        );\r\n\r\n```\r\n"}}
{"actor":{"display_login":"greg0ire"}}