{"action":"created","comment":{"url":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/comments/85898280","pull_request_review_id":6584586,"id":85898280,"diff_hunk":"@@ -1,43 +1,88 @@\n <?php\n /*\n-* This file is part of EC-CUBE\n-*\n-* Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved.\n-* http://www.lockon.co.jp/\n-*\n-* For the full copyright and license information, please view the LICENSE\n-* file that was distributed with this source code.\n-*/\n+  * This file is part of the CategoryContent plugin\n+  *\n+  * Copyright (C) 2016 LOCKON CO.,LTD. All Rights Reserved.\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 Plugin\\CategoryContent;\n \n use Eccube\\Plugin\\AbstractPluginManager;\n+use Plugin\\CategoryContent\\Entity\\CategoryContent;\n \n+/**\n+ * Class PluginManager.\n+ */\n class PluginManager extends AbstractPluginManager\n {\n-\n+    /**\n+     * プラグインインストール時の処理.\n+     *\n+     * @param array  $config\n+     * @param object $app\n+     *\n+     * @throws \\Exception\n+     */\n     public function install($config, $app)\n     {\n-        $this->migrationSchema($app, __DIR__.'/Migration', $config['code']);\n     }\n-\n+    /**\n+     * プラグイン削除時の処理.\n+     *\n+     * @param array  $config\n+     * @param object $app\n+     */\n     public function uninstall($config, $app)\n     {\n-        $this->migrationSchema($app, __DIR__.'/Migration', $config['code'], 0);\n+        $this->migrationSchema($app, __DIR__.'/Resource/doctrine/migration', $config['code'], 0);\n     }\n \n+    /**\n+     * プラグイン有効時の処理.\n+     *\n+     * @param array  $config\n+     * @param object $app\n+     *\n+     * @throws \\Exception\n+     */\n     public function enable($config, $app)\n     {\n+        $this->migrationSchema($app, __DIR__.'/Resource/doctrine/migration', $config['code']);\n+        $em = $app['orm.em'];\n \n+        // serviceで定義している情報が取得できないため、直接呼び出す\n+        try {\n+            // EC-CUBE3.0.3対応\n+            $CategoryContent = $em->getRepository('Plugin\\CategoryContent\\Entity\\CategoryContent')->find(1);\n+        } catch (\\Exception $e) {\n+            return null;\n+        }\n+        if (!$CategoryContent) {\n+            $CategoryContent = new CategoryContent();\n+            // IDは1固定\n+            $CategoryContent->setId(1);\n+            $em->persist($CategoryContent);\n+            $em->flush($CategoryContent);\n+        }\n     }\n-\n+    /**\n+     * プラグイン無効時の処理.\n+     *\n+     * @param array  $config\n+     * @param object $app\n+     */\n     public function disable($config, $app)\n     {\n-\n     }\n \n+    /**\n+     * @param array  $config\n+     * @param object $app\n+     */\n     public function update($config, $app)","path":"PluginManager.php","position":99,"original_position":99,"commit_id":"3a621ffe6d0674541922029c59cce2a8deacf242","original_commit_id":"24546fcc09fe78a3a97d3872d1a27e09f534821e","user":{"login":"hoand-vn","id":18605901,"avatar_url":"https://avatars.githubusercontent.com/u/18605901?v=3","gravatar_id":"","url":"https://api.github.com/users/hoand-vn","html_url":"https://github.com/hoand-vn","followers_url":"https://api.github.com/users/hoand-vn/followers","following_url":"https://api.github.com/users/hoand-vn/following{/other_user}","gists_url":"https://api.github.com/users/hoand-vn/gists{/gist_id}","starred_url":"https://api.github.com/users/hoand-vn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoand-vn/subscriptions","organizations_url":"https://api.github.com/users/hoand-vn/orgs","repos_url":"https://api.github.com/users/hoand-vn/repos","events_url":"https://api.github.com/users/hoand-vn/events{/privacy}","received_events_url":"https://api.github.com/users/hoand-vn/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2016-11-01T09:41:18Z","updated_at":"2016-11-01T09:41:18Z","html_url":"https://github.com/eccubevn/category-content-plugin/pull/3#discussion_r85898280","pull_request_url":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/comments/85898280"},"html":{"href":"https://github.com/eccubevn/category-content-plugin/pull/3#discussion_r85898280"},"pull_request":{"href":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/3","id":90961668,"html_url":"https://github.com/eccubevn/category-content-plugin/pull/3","diff_url":"https://github.com/eccubevn/category-content-plugin/pull/3.diff","patch_url":"https://github.com/eccubevn/category-content-plugin/pull/3.patch","issue_url":"https://api.github.com/repos/eccubevn/category-content-plugin/issues/3","number":3,"state":"open","locked":false,"title":"Renewal","user":{"login":"hoand-vn","id":18605901,"avatar_url":"https://avatars.githubusercontent.com/u/18605901?v=3","gravatar_id":"","url":"https://api.github.com/users/hoand-vn","html_url":"https://github.com/hoand-vn","followers_url":"https://api.github.com/users/hoand-vn/followers","following_url":"https://api.github.com/users/hoand-vn/following{/other_user}","gists_url":"https://api.github.com/users/hoand-vn/gists{/gist_id}","starred_url":"https://api.github.com/users/hoand-vn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoand-vn/subscriptions","organizations_url":"https://api.github.com/users/hoand-vn/orgs","repos_url":"https://api.github.com/users/hoand-vn/repos","events_url":"https://api.github.com/users/hoand-vn/events{/privacy}","received_events_url":"https://api.github.com/users/hoand-vn/received_events","type":"User","site_admin":false},"body":"for travis checking\n","created_at":"2016-10-26T08:54:58Z","updated_at":"2016-11-01T09:41:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76c3a346219683acda1cfc48ace8e0894dfdd543","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/3/commits","review_comments_url":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/3/comments","review_comment_url":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eccubevn/category-content-plugin/issues/3/comments","statuses_url":"https://api.github.com/repos/eccubevn/category-content-plugin/statuses/3a621ffe6d0674541922029c59cce2a8deacf242","head":{"label":"eccubevn:renewal","ref":"renewal","sha":"3a621ffe6d0674541922029c59cce2a8deacf242","user":{"login":"eccubevn","id":19646075,"avatar_url":"https://avatars.githubusercontent.com/u/19646075?v=3","gravatar_id":"","url":"https://api.github.com/users/eccubevn","html_url":"https://github.com/eccubevn","followers_url":"https://api.github.com/users/eccubevn/followers","following_url":"https://api.github.com/users/eccubevn/following{/other_user}","gists_url":"https://api.github.com/users/eccubevn/gists{/gist_id}","starred_url":"https://api.github.com/users/eccubevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eccubevn/subscriptions","organizations_url":"https://api.github.com/users/eccubevn/orgs","repos_url":"https://api.github.com/users/eccubevn/repos","events_url":"https://api.github.com/users/eccubevn/events{/privacy}","received_events_url":"https://api.github.com/users/eccubevn/received_events","type":"Organization","site_admin":false},"repo":{"id":60050687,"name":"category-content-plugin","full_name":"eccubevn/category-content-plugin","owner":{"login":"eccubevn","id":19646075,"avatar_url":"https://avatars.githubusercontent.com/u/19646075?v=3","gravatar_id":"","url":"https://api.github.com/users/eccubevn","html_url":"https://github.com/eccubevn","followers_url":"https://api.github.com/users/eccubevn/followers","following_url":"https://api.github.com/users/eccubevn/following{/other_user}","gists_url":"https://api.github.com/users/eccubevn/gists{/gist_id}","starred_url":"https://api.github.com/users/eccubevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eccubevn/subscriptions","organizations_url":"https://api.github.com/users/eccubevn/orgs","repos_url":"https://api.github.com/users/eccubevn/repos","events_url":"https://api.github.com/users/eccubevn/events{/privacy}","received_events_url":"https://api.github.com/users/eccubevn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eccubevn/category-content-plugin","description":"カテゴリーコンテンツ","fork":true,"url":"https://api.github.com/repos/eccubevn/category-content-plugin","forks_url":"https://api.github.com/repos/eccubevn/category-content-plugin/forks","keys_url":"https://api.github.com/repos/eccubevn/category-content-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eccubevn/category-content-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eccubevn/category-content-plugin/teams","hooks_url":"https://api.github.com/repos/eccubevn/category-content-plugin/hooks","issue_events_url":"https://api.github.com/repos/eccubevn/category-content-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/eccubevn/category-content-plugin/events","assignees_url":"https://api.github.com/repos/eccubevn/category-content-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/eccubevn/category-content-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/eccubevn/category-content-plugin/tags","blobs_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eccubevn/category-content-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/eccubevn/category-content-plugin/languages","stargazers_url":"https://api.github.com/repos/eccubevn/category-content-plugin/stargazers","contributors_url":"https://api.github.com/repos/eccubevn/category-content-plugin/contributors","subscribers_url":"https://api.github.com/repos/eccubevn/category-content-plugin/subscribers","subscription_url":"https://api.github.com/repos/eccubevn/category-content-plugin/subscription","commits_url":"https://api.github.com/repos/eccubevn/category-content-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/eccubevn/category-content-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/eccubevn/category-content-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/eccubevn/category-content-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/eccubevn/category-content-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eccubevn/category-content-plugin/merges","archive_url":"https://api.github.com/repos/eccubevn/category-content-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eccubevn/category-content-plugin/downloads","issues_url":"https://api.github.com/repos/eccubevn/category-content-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/eccubevn/category-content-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/eccubevn/category-content-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eccubevn/category-content-plugin/labels{/name}","releases_url":"https://api.github.com/repos/eccubevn/category-content-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/eccubevn/category-content-plugin/deployments","created_at":"2016-05-31T01:59:00Z","updated_at":"2016-05-31T01:59:00Z","pushed_at":"2016-11-01T09:40:35Z","git_url":"git://github.com/eccubevn/category-content-plugin.git","ssh_url":"git@github.com:eccubevn/category-content-plugin.git","clone_url":"https://github.com/eccubevn/category-content-plugin.git","svn_url":"https://github.com/eccubevn/category-content-plugin","homepage":null,"size":68,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"eccubevn:master","ref":"master","sha":"6e53d297247291b7f4c3f4aab2ec22f4cbc482d0","user":{"login":"eccubevn","id":19646075,"avatar_url":"https://avatars.githubusercontent.com/u/19646075?v=3","gravatar_id":"","url":"https://api.github.com/users/eccubevn","html_url":"https://github.com/eccubevn","followers_url":"https://api.github.com/users/eccubevn/followers","following_url":"https://api.github.com/users/eccubevn/following{/other_user}","gists_url":"https://api.github.com/users/eccubevn/gists{/gist_id}","starred_url":"https://api.github.com/users/eccubevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eccubevn/subscriptions","organizations_url":"https://api.github.com/users/eccubevn/orgs","repos_url":"https://api.github.com/users/eccubevn/repos","events_url":"https://api.github.com/users/eccubevn/events{/privacy}","received_events_url":"https://api.github.com/users/eccubevn/received_events","type":"Organization","site_admin":false},"repo":{"id":60050687,"name":"category-content-plugin","full_name":"eccubevn/category-content-plugin","owner":{"login":"eccubevn","id":19646075,"avatar_url":"https://avatars.githubusercontent.com/u/19646075?v=3","gravatar_id":"","url":"https://api.github.com/users/eccubevn","html_url":"https://github.com/eccubevn","followers_url":"https://api.github.com/users/eccubevn/followers","following_url":"https://api.github.com/users/eccubevn/following{/other_user}","gists_url":"https://api.github.com/users/eccubevn/gists{/gist_id}","starred_url":"https://api.github.com/users/eccubevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eccubevn/subscriptions","organizations_url":"https://api.github.com/users/eccubevn/orgs","repos_url":"https://api.github.com/users/eccubevn/repos","events_url":"https://api.github.com/users/eccubevn/events{/privacy}","received_events_url":"https://api.github.com/users/eccubevn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eccubevn/category-content-plugin","description":"カテゴリーコンテンツ","fork":true,"url":"https://api.github.com/repos/eccubevn/category-content-plugin","forks_url":"https://api.github.com/repos/eccubevn/category-content-plugin/forks","keys_url":"https://api.github.com/repos/eccubevn/category-content-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eccubevn/category-content-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eccubevn/category-content-plugin/teams","hooks_url":"https://api.github.com/repos/eccubevn/category-content-plugin/hooks","issue_events_url":"https://api.github.com/repos/eccubevn/category-content-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/eccubevn/category-content-plugin/events","assignees_url":"https://api.github.com/repos/eccubevn/category-content-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/eccubevn/category-content-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/eccubevn/category-content-plugin/tags","blobs_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eccubevn/category-content-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/eccubevn/category-content-plugin/languages","stargazers_url":"https://api.github.com/repos/eccubevn/category-content-plugin/stargazers","contributors_url":"https://api.github.com/repos/eccubevn/category-content-plugin/contributors","subscribers_url":"https://api.github.com/repos/eccubevn/category-content-plugin/subscribers","subscription_url":"https://api.github.com/repos/eccubevn/category-content-plugin/subscription","commits_url":"https://api.github.com/repos/eccubevn/category-content-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/eccubevn/category-content-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/eccubevn/category-content-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/eccubevn/category-content-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/eccubevn/category-content-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/eccubevn/category-content-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eccubevn/category-content-plugin/merges","archive_url":"https://api.github.com/repos/eccubevn/category-content-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eccubevn/category-content-plugin/downloads","issues_url":"https://api.github.com/repos/eccubevn/category-content-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/eccubevn/category-content-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/eccubevn/category-content-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eccubevn/category-content-plugin/labels{/name}","releases_url":"https://api.github.com/repos/eccubevn/category-content-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/eccubevn/category-content-plugin/deployments","created_at":"2016-05-31T01:59:00Z","updated_at":"2016-05-31T01:59:00Z","pushed_at":"2016-11-01T09:40:35Z","git_url":"git://github.com/eccubevn/category-content-plugin.git","ssh_url":"git@github.com:eccubevn/category-content-plugin.git","clone_url":"https://github.com/eccubevn/category-content-plugin.git","svn_url":"https://github.com/eccubevn/category-content-plugin","homepage":null,"size":68,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/3"},"html":{"href":"https://github.com/eccubevn/category-content-plugin/pull/3"},"issue":{"href":"https://api.github.com/repos/eccubevn/category-content-plugin/issues/3"},"comments":{"href":"https://api.github.com/repos/eccubevn/category-content-plugin/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eccubevn/category-content-plugin/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/eccubevn/category-content-plugin/statuses/3a621ffe6d0674541922029c59cce2a8deacf242"}}}}
{"actor":{"display_login":"hoand-vn"}}