{"action":"created","comment":{"url":"https://api.github.com/repos/elcodi/bamboo/pulls/comments/23675189","id":23675189,"diff_hunk":"@@ -0,0 +1,54 @@\n+<?php\n+\n+/*\n+ * This file is part of the Elcodi package.\n+ *\n+ * Copyright (c) 2014 Elcodi.com\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ *\n+ * Feel free to edit as you please, and have fun.\n+ *\n+ * @author Marc Morera <yuhu@mmoreram.com>\n+ * @author Aldo Chiecchia <zimage@tiscali.it>\n+ */\n+\n+namespace Elcodi\\Admin\\PageBundle\\Form\\EventListener;\n+\n+use Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\n+use Symfony\\Component\\Form\\FormEvent;\n+use Symfony\\Component\\Form\\FormEvents;\n+\n+/**\n+ * Class PermanentPageSubscriber checks if the page that's being handled by the form is persistent to modify the form\n+ * fields removing the options that are not present for persistent pages.\n+ */\n+class PermanentPageSubscriber implements EventSubscriberInterface","path":"src/Elcodi/Admin/PageBundle/Form/EventListener/PermanentPageSubscriber.php","position":27,"original_position":27,"commit_id":"93b9599fb1431f4b76d89b31a0cf0447c2f1fc8a","original_commit_id":"93b9599fb1431f4b76d89b31a0cf0447c2f1fc8a","user":{"login":"alch","id":682515,"avatar_url":"https://avatars.githubusercontent.com/u/682515?v=3","gravatar_id":"","url":"https://api.github.com/users/alch","html_url":"https://github.com/alch","followers_url":"https://api.github.com/users/alch/followers","following_url":"https://api.github.com/users/alch/following{/other_user}","gists_url":"https://api.github.com/users/alch/gists{/gist_id}","starred_url":"https://api.github.com/users/alch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alch/subscriptions","organizations_url":"https://api.github.com/users/alch/orgs","repos_url":"https://api.github.com/users/alch/repos","events_url":"https://api.github.com/users/alch/events{/privacy}","received_events_url":"https://api.github.com/users/alch/received_events","type":"User","site_admin":false},"body":"Any specific reason to use `EventSubscriber` instead of a simple listener?","created_at":"2015-01-28T09:42:47Z","updated_at":"2015-01-28T09:42:47Z","html_url":"https://github.com/elcodi/bamboo/pull/19#discussion_r23675189","pull_request_url":"https://api.github.com/repos/elcodi/bamboo/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/elcodi/bamboo/pulls/comments/23675189"},"html":{"href":"https://github.com/elcodi/bamboo/pull/19#discussion_r23675189"},"pull_request":{"href":"https://api.github.com/repos/elcodi/bamboo/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/elcodi/bamboo/pulls/19","id":28041691,"html_url":"https://github.com/elcodi/bamboo/pull/19","diff_url":"https://github.com/elcodi/bamboo/pull/19.diff","patch_url":"https://github.com/elcodi/bamboo/pull/19.patch","issue_url":"https://api.github.com/repos/elcodi/bamboo/issues/19","number":19,"state":"open","locked":false,"title":"Persistent pages","user":{"login":"rogergros","id":2053670,"avatar_url":"https://avatars.githubusercontent.com/u/2053670?v=3","gravatar_id":"","url":"https://api.github.com/users/rogergros","html_url":"https://github.com/rogergros","followers_url":"https://api.github.com/users/rogergros/followers","following_url":"https://api.github.com/users/rogergros/following{/other_user}","gists_url":"https://api.github.com/users/rogergros/gists{/gist_id}","starred_url":"https://api.github.com/users/rogergros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogergros/subscriptions","organizations_url":"https://api.github.com/users/rogergros/orgs","repos_url":"https://api.github.com/users/rogergros/repos","events_url":"https://api.github.com/users/rogergros/events{/privacy}","received_events_url":"https://api.github.com/users/rogergros/received_events","type":"User","site_admin":false},"body":"Added the possibility to add \"persistent pages\" that can be modified but not removed neither disabled.\r\n- Added an event listener to page form so when the form is loaded it does the necessary changes for persistent pages like hide the \"enable/disable\" button\r\n- If you try to access the url to enable/disable or remove this pages you get an Access denied error\r\n- Added to page fixture so the About us and Terms and conditions pages are generated as \"persistent pages\"\r\n\r\nPing @elcodi/owners  \r\n\r\n**IS BLOCKED BY https://github.com/elcodi/elcodi/pull/493**","created_at":"2015-01-26T16:57:12Z","updated_at":"2015-01-28T09:42:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74665751110296b0b9ca2ada8dfbba577e7a090a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elcodi/bamboo/pulls/19/commits","review_comments_url":"https://api.github.com/repos/elcodi/bamboo/pulls/19/comments","review_comment_url":"https://api.github.com/repos/elcodi/bamboo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/elcodi/bamboo/issues/19/comments","statuses_url":"https://api.github.com/repos/elcodi/bamboo/statuses/93b9599fb1431f4b76d89b31a0cf0447c2f1fc8a","head":{"label":"elcodi:task/58-persistent-pages","ref":"task/58-persistent-pages","sha":"93b9599fb1431f4b76d89b31a0cf0447c2f1fc8a","user":{"login":"elcodi","id":7143476,"avatar_url":"https://avatars.githubusercontent.com/u/7143476?v=3","gravatar_id":"","url":"https://api.github.com/users/elcodi","html_url":"https://github.com/elcodi","followers_url":"https://api.github.com/users/elcodi/followers","following_url":"https://api.github.com/users/elcodi/following{/other_user}","gists_url":"https://api.github.com/users/elcodi/gists{/gist_id}","starred_url":"https://api.github.com/users/elcodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcodi/subscriptions","organizations_url":"https://api.github.com/users/elcodi/orgs","repos_url":"https://api.github.com/users/elcodi/repos","events_url":"https://api.github.com/users/elcodi/events{/privacy}","received_events_url":"https://api.github.com/users/elcodi/received_events","type":"Organization","site_admin":false},"repo":{"id":29528579,"name":"bamboo","full_name":"elcodi/bamboo","owner":{"login":"elcodi","id":7143476,"avatar_url":"https://avatars.githubusercontent.com/u/7143476?v=3","gravatar_id":"","url":"https://api.github.com/users/elcodi","html_url":"https://github.com/elcodi","followers_url":"https://api.github.com/users/elcodi/followers","following_url":"https://api.github.com/users/elcodi/following{/other_user}","gists_url":"https://api.github.com/users/elcodi/gists{/gist_id}","starred_url":"https://api.github.com/users/elcodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcodi/subscriptions","organizations_url":"https://api.github.com/users/elcodi/orgs","repos_url":"https://api.github.com/users/elcodi/repos","events_url":"https://api.github.com/users/elcodi/events{/privacy}","received_events_url":"https://api.github.com/users/elcodi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elcodi/bamboo","description":"Hitch your bamboo to a star!  http://bamboo.elcodi.com","fork":false,"url":"https://api.github.com/repos/elcodi/bamboo","forks_url":"https://api.github.com/repos/elcodi/bamboo/forks","keys_url":"https://api.github.com/repos/elcodi/bamboo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elcodi/bamboo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elcodi/bamboo/teams","hooks_url":"https://api.github.com/repos/elcodi/bamboo/hooks","issue_events_url":"https://api.github.com/repos/elcodi/bamboo/issues/events{/number}","events_url":"https://api.github.com/repos/elcodi/bamboo/events","assignees_url":"https://api.github.com/repos/elcodi/bamboo/assignees{/user}","branches_url":"https://api.github.com/repos/elcodi/bamboo/branches{/branch}","tags_url":"https://api.github.com/repos/elcodi/bamboo/tags","blobs_url":"https://api.github.com/repos/elcodi/bamboo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elcodi/bamboo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elcodi/bamboo/git/refs{/sha}","trees_url":"https://api.github.com/repos/elcodi/bamboo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elcodi/bamboo/statuses/{sha}","languages_url":"https://api.github.com/repos/elcodi/bamboo/languages","stargazers_url":"https://api.github.com/repos/elcodi/bamboo/stargazers","contributors_url":"https://api.github.com/repos/elcodi/bamboo/contributors","subscribers_url":"https://api.github.com/repos/elcodi/bamboo/subscribers","subscription_url":"https://api.github.com/repos/elcodi/bamboo/subscription","commits_url":"https://api.github.com/repos/elcodi/bamboo/commits{/sha}","git_commits_url":"https://api.github.com/repos/elcodi/bamboo/git/commits{/sha}","comments_url":"https://api.github.com/repos/elcodi/bamboo/comments{/number}","issue_comment_url":"https://api.github.com/repos/elcodi/bamboo/issues/comments/{number}","contents_url":"https://api.github.com/repos/elcodi/bamboo/contents/{+path}","compare_url":"https://api.github.com/repos/elcodi/bamboo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elcodi/bamboo/merges","archive_url":"https://api.github.com/repos/elcodi/bamboo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elcodi/bamboo/downloads","issues_url":"https://api.github.com/repos/elcodi/bamboo/issues{/number}","pulls_url":"https://api.github.com/repos/elcodi/bamboo/pulls{/number}","milestones_url":"https://api.github.com/repos/elcodi/bamboo/milestones{/number}","notifications_url":"https://api.github.com/repos/elcodi/bamboo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elcodi/bamboo/labels{/name}","releases_url":"https://api.github.com/repos/elcodi/bamboo/releases{/id}","created_at":"2015-01-20T12:23:41Z","updated_at":"2015-01-27T12:48:20Z","pushed_at":"2015-01-28T09:33:44Z","git_url":"git://github.com/elcodi/bamboo.git","ssh_url":"git@github.com:elcodi/bamboo.git","clone_url":"https://github.com/elcodi/bamboo.git","svn_url":"https://github.com/elcodi/bamboo","homepage":null,"size":26182,"stargazers_count":11,"watchers_count":11,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":11,"default_branch":"master"}},"base":{"label":"elcodi:master","ref":"master","sha":"3d117dc5bb2b27c85eaf1d79b49c6b27241d3ac9","user":{"login":"elcodi","id":7143476,"avatar_url":"https://avatars.githubusercontent.com/u/7143476?v=3","gravatar_id":"","url":"https://api.github.com/users/elcodi","html_url":"https://github.com/elcodi","followers_url":"https://api.github.com/users/elcodi/followers","following_url":"https://api.github.com/users/elcodi/following{/other_user}","gists_url":"https://api.github.com/users/elcodi/gists{/gist_id}","starred_url":"https://api.github.com/users/elcodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcodi/subscriptions","organizations_url":"https://api.github.com/users/elcodi/orgs","repos_url":"https://api.github.com/users/elcodi/repos","events_url":"https://api.github.com/users/elcodi/events{/privacy}","received_events_url":"https://api.github.com/users/elcodi/received_events","type":"Organization","site_admin":false},"repo":{"id":29528579,"name":"bamboo","full_name":"elcodi/bamboo","owner":{"login":"elcodi","id":7143476,"avatar_url":"https://avatars.githubusercontent.com/u/7143476?v=3","gravatar_id":"","url":"https://api.github.com/users/elcodi","html_url":"https://github.com/elcodi","followers_url":"https://api.github.com/users/elcodi/followers","following_url":"https://api.github.com/users/elcodi/following{/other_user}","gists_url":"https://api.github.com/users/elcodi/gists{/gist_id}","starred_url":"https://api.github.com/users/elcodi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcodi/subscriptions","organizations_url":"https://api.github.com/users/elcodi/orgs","repos_url":"https://api.github.com/users/elcodi/repos","events_url":"https://api.github.com/users/elcodi/events{/privacy}","received_events_url":"https://api.github.com/users/elcodi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elcodi/bamboo","description":"Hitch your bamboo to a star!  http://bamboo.elcodi.com","fork":false,"url":"https://api.github.com/repos/elcodi/bamboo","forks_url":"https://api.github.com/repos/elcodi/bamboo/forks","keys_url":"https://api.github.com/repos/elcodi/bamboo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elcodi/bamboo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elcodi/bamboo/teams","hooks_url":"https://api.github.com/repos/elcodi/bamboo/hooks","issue_events_url":"https://api.github.com/repos/elcodi/bamboo/issues/events{/number}","events_url":"https://api.github.com/repos/elcodi/bamboo/events","assignees_url":"https://api.github.com/repos/elcodi/bamboo/assignees{/user}","branches_url":"https://api.github.com/repos/elcodi/bamboo/branches{/branch}","tags_url":"https://api.github.com/repos/elcodi/bamboo/tags","blobs_url":"https://api.github.com/repos/elcodi/bamboo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elcodi/bamboo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elcodi/bamboo/git/refs{/sha}","trees_url":"https://api.github.com/repos/elcodi/bamboo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elcodi/bamboo/statuses/{sha}","languages_url":"https://api.github.com/repos/elcodi/bamboo/languages","stargazers_url":"https://api.github.com/repos/elcodi/bamboo/stargazers","contributors_url":"https://api.github.com/repos/elcodi/bamboo/contributors","subscribers_url":"https://api.github.com/repos/elcodi/bamboo/subscribers","subscription_url":"https://api.github.com/repos/elcodi/bamboo/subscription","commits_url":"https://api.github.com/repos/elcodi/bamboo/commits{/sha}","git_commits_url":"https://api.github.com/repos/elcodi/bamboo/git/commits{/sha}","comments_url":"https://api.github.com/repos/elcodi/bamboo/comments{/number}","issue_comment_url":"https://api.github.com/repos/elcodi/bamboo/issues/comments/{number}","contents_url":"https://api.github.com/repos/elcodi/bamboo/contents/{+path}","compare_url":"https://api.github.com/repos/elcodi/bamboo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elcodi/bamboo/merges","archive_url":"https://api.github.com/repos/elcodi/bamboo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elcodi/bamboo/downloads","issues_url":"https://api.github.com/repos/elcodi/bamboo/issues{/number}","pulls_url":"https://api.github.com/repos/elcodi/bamboo/pulls{/number}","milestones_url":"https://api.github.com/repos/elcodi/bamboo/milestones{/number}","notifications_url":"https://api.github.com/repos/elcodi/bamboo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elcodi/bamboo/labels{/name}","releases_url":"https://api.github.com/repos/elcodi/bamboo/releases{/id}","created_at":"2015-01-20T12:23:41Z","updated_at":"2015-01-27T12:48:20Z","pushed_at":"2015-01-28T09:33:44Z","git_url":"git://github.com/elcodi/bamboo.git","ssh_url":"git@github.com:elcodi/bamboo.git","clone_url":"https://github.com/elcodi/bamboo.git","svn_url":"https://github.com/elcodi/bamboo","homepage":null,"size":26182,"stargazers_count":11,"watchers_count":11,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elcodi/bamboo/pulls/19"},"html":{"href":"https://github.com/elcodi/bamboo/pull/19"},"issue":{"href":"https://api.github.com/repos/elcodi/bamboo/issues/19"},"comments":{"href":"https://api.github.com/repos/elcodi/bamboo/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/elcodi/bamboo/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/elcodi/bamboo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/elcodi/bamboo/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/elcodi/bamboo/statuses/93b9599fb1431f4b76d89b31a0cf0447c2f1fc8a"}}}}