{"action":"created","comment":{"url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/comments/71655522","id":71655522,"diff_hunk":"@@ -0,0 +1,69 @@\n+<?php\n+\n+/*\n+ * This file is part of the Sonata Project package.\n+ *\n+ * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace Sonata\\ArticleBundle\\Controller;\n+\n+use Sonata\\AdminBundle\\Controller\\CRUDController;\n+use Symfony\\Component\\Form\\Form;\n+use Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException;\n+\n+/**\n+ * @author Hugo Briand <briand@ekino.com>\n+ */\n+class FragmentAdminController extends CRUDController\n+{\n+    /**\n+     * @return Response\n+     *\n+     * @throws \\RuntimeException\n+     * @throws AccessDeniedException\n+     */\n+    public function formAction()\n+    {\n+        if (false === $this->admin->isGranted('CREATE')) {\n+            throw new AccessDeniedException();\n+        }\n+\n+        $object = $this->admin->getNewInstance();\n+\n+        $this->admin->setSubject($object);\n+\n+        /** @var $form Form */\n+        $form = $this->admin->getForm();\n+        $form->remove('type')->add('type', 'hidden'); // Hide type field when adding","path":"Controller/FragmentAdminController.php","position":42,"original_position":42,"commit_id":"2853f5c16a3c6757e9ab7f2283d57d1df6a904b5","original_commit_id":"2853f5c16a3c6757e9ab7f2283d57d1df6a904b5","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},"body":"Ok, but why?","created_at":"2016-07-21T06:59:04Z","updated_at":"2016-07-21T06:59:04Z","html_url":"https://github.com/sonata-project/SonataArticleBundle/pull/2#discussion_r71655522","pull_request_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/comments/71655522"},"html":{"href":"https://github.com/sonata-project/SonataArticleBundle/pull/2#discussion_r71655522"},"pull_request":{"href":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/2","id":77157327,"html_url":"https://github.com/sonata-project/SonataArticleBundle/pull/2","diff_url":"https://github.com/sonata-project/SonataArticleBundle/pull/2.diff","patch_url":"https://github.com/sonata-project/SonataArticleBundle/pull/2.patch","issue_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/issues/2","number":2,"state":"open","locked":false,"title":"Init article bundle","user":{"login":"bmaziere","id":2480227,"avatar_url":"https://avatars.githubusercontent.com/u/2480227?v=3","gravatar_id":"","url":"https://api.github.com/users/bmaziere","html_url":"https://github.com/bmaziere","followers_url":"https://api.github.com/users/bmaziere/followers","following_url":"https://api.github.com/users/bmaziere/following{/other_user}","gists_url":"https://api.github.com/users/bmaziere/gists{/gist_id}","starred_url":"https://api.github.com/users/bmaziere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmaziere/subscriptions","organizations_url":"https://api.github.com/users/bmaziere/orgs","repos_url":"https://api.github.com/users/bmaziere/repos","events_url":"https://api.github.com/users/bmaziere/events{/privacy}","received_events_url":"https://api.github.com/users/bmaziere/received_events","type":"User","site_admin":false},"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    - master 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/SonataArticleBundle/blob/master/CONTRIBUTING.md#the-base-branch\r\n-->\r\nInit project\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\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- Added base classes to provide base article admin and fragment management inside\r\n```\r\n\r\n## Subject\r\n\r\nInit project\r\n\r\n","created_at":"2016-07-12T17:23:20Z","updated_at":"2016-07-21T06:59:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5aff52f86a6672671d1ebae34acfc0875f75a6ed","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/2/commits","review_comments_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/2/comments","review_comment_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/issues/2/comments","statuses_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/statuses/2853f5c16a3c6757e9ab7f2283d57d1df6a904b5","head":{"label":"bmaziere:init-article-bundle","ref":"init-article-bundle","sha":"2853f5c16a3c6757e9ab7f2283d57d1df6a904b5","user":{"login":"bmaziere","id":2480227,"avatar_url":"https://avatars.githubusercontent.com/u/2480227?v=3","gravatar_id":"","url":"https://api.github.com/users/bmaziere","html_url":"https://github.com/bmaziere","followers_url":"https://api.github.com/users/bmaziere/followers","following_url":"https://api.github.com/users/bmaziere/following{/other_user}","gists_url":"https://api.github.com/users/bmaziere/gists{/gist_id}","starred_url":"https://api.github.com/users/bmaziere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmaziere/subscriptions","organizations_url":"https://api.github.com/users/bmaziere/orgs","repos_url":"https://api.github.com/users/bmaziere/repos","events_url":"https://api.github.com/users/bmaziere/events{/privacy}","received_events_url":"https://api.github.com/users/bmaziere/received_events","type":"User","site_admin":false},"repo":{"id":63176179,"name":"SonataArticleBundle","full_name":"bmaziere/SonataArticleBundle","owner":{"login":"bmaziere","id":2480227,"avatar_url":"https://avatars.githubusercontent.com/u/2480227?v=3","gravatar_id":"","url":"https://api.github.com/users/bmaziere","html_url":"https://github.com/bmaziere","followers_url":"https://api.github.com/users/bmaziere/followers","following_url":"https://api.github.com/users/bmaziere/following{/other_user}","gists_url":"https://api.github.com/users/bmaziere/gists{/gist_id}","starred_url":"https://api.github.com/users/bmaziere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmaziere/subscriptions","organizations_url":"https://api.github.com/users/bmaziere/orgs","repos_url":"https://api.github.com/users/bmaziere/repos","events_url":"https://api.github.com/users/bmaziere/events{/privacy}","received_events_url":"https://api.github.com/users/bmaziere/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bmaziere/SonataArticleBundle","description":"Advanced article management","fork":true,"url":"https://api.github.com/repos/bmaziere/SonataArticleBundle","forks_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/forks","keys_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/teams","hooks_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/hooks","issue_events_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/issues/events{/number}","events_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/events","assignees_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/assignees{/user}","branches_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/branches{/branch}","tags_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/tags","blobs_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/languages","stargazers_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/stargazers","contributors_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/contributors","subscribers_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/subscribers","subscription_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/subscription","commits_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/contents/{+path}","compare_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/merges","archive_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/downloads","issues_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/issues{/number}","pulls_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/labels{/name}","releases_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/releases{/id}","deployments_url":"https://api.github.com/repos/bmaziere/SonataArticleBundle/deployments","created_at":"2016-07-12T16:53:03Z","updated_at":"2016-07-12T16:53:04Z","pushed_at":"2016-07-19T17:04:53Z","git_url":"git://github.com/bmaziere/SonataArticleBundle.git","ssh_url":"git@github.com:bmaziere/SonataArticleBundle.git","clone_url":"https://github.com/bmaziere/SonataArticleBundle.git","svn_url":"https://github.com/bmaziere/SonataArticleBundle","homepage":"","size":47,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"11f017251bb40fc7d7ace7a7a6970b7a83964004","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":63052951,"name":"SonataArticleBundle","full_name":"sonata-project/SonataArticleBundle","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/SonataArticleBundle","description":"Advanced article management","fork":false,"url":"https://api.github.com/repos/sonata-project/SonataArticleBundle","forks_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/forks","keys_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/teams","hooks_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/hooks","issue_events_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/issues/events{/number}","events_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/events","assignees_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/assignees{/user}","branches_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/branches{/branch}","tags_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/tags","blobs_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/languages","stargazers_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/stargazers","contributors_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/contributors","subscribers_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/subscribers","subscription_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/subscription","commits_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/contents/{+path}","compare_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/merges","archive_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/downloads","issues_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/issues{/number}","pulls_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/labels{/name}","releases_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/releases{/id}","deployments_url":"https://api.github.com/repos/sonata-project/SonataArticleBundle/deployments","created_at":"2016-07-11T09:01:46Z","updated_at":"2016-07-11T14:38:00Z","pushed_at":"2016-07-19T17:04:54Z","git_url":"git://github.com/sonata-project/SonataArticleBundle.git","ssh_url":"git@github.com:sonata-project/SonataArticleBundle.git","clone_url":"https://github.com/sonata-project/SonataArticleBundle.git","svn_url":"https://github.com/sonata-project/SonataArticleBundle","homepage":"","size":13,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/2"},"html":{"href":"https://github.com/sonata-project/SonataArticleBundle/pull/2"},"issue":{"href":"https://api.github.com/repos/sonata-project/SonataArticleBundle/issues/2"},"comments":{"href":"https://api.github.com/repos/sonata-project/SonataArticleBundle/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sonata-project/SonataArticleBundle/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/sonata-project/SonataArticleBundle/statuses/2853f5c16a3c6757e9ab7f2283d57d1df6a904b5"}}}}
{"actor":{"display_login":"greg0ire"}}