{"action":"created","comment":{"url":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/comments/283263508","pull_request_review_id":236571412,"id":283263508,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4MzI2MzUwOA==","diff_hunk":"@@ -96,4 +122,23 @@ public function showItemOld($name = null, $itemId = null)\n \n         return $this->showItem(\"\", (int)$itemId, 0);\n     }\n+\n+    public function showItemForCategory($category = null)\n+    {\n+\n+        /** @var ItemListService $itemListService */\n+        $itemListService = pluginApp(ItemListService::class);\n+        $itemList = $itemListService->getItemList(ItemListService::TYPE_CATEGORY, $category->id, null, 1);\n+        if (!count($itemList['documents']))\n+        {\n+            $itemList = $itemListService->getItemList(ItemListService::TYPE_RANDOM);","path":"src/Controllers/ItemController.php","position":85,"original_position":85,"commit_id":"c50f7ca5bda01076dec154e8a616b0fc2a7940f7","original_commit_id":"c50f7ca5bda01076dec154e8a616b0fc2a7940f7","user":{"login":"cjohannsen","id":22615263,"node_id":"MDQ6VXNlcjIyNjE1MjYz","avatar_url":"https://avatars2.githubusercontent.com/u/22615263?v=4","gravatar_id":"","url":"https://api.github.com/users/cjohannsen","html_url":"https://github.com/cjohannsen","followers_url":"https://api.github.com/users/cjohannsen/followers","following_url":"https://api.github.com/users/cjohannsen/following{/other_user}","gists_url":"https://api.github.com/users/cjohannsen/gists{/gist_id}","starred_url":"https://api.github.com/users/cjohannsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjohannsen/subscriptions","organizations_url":"https://api.github.com/users/cjohannsen/orgs","repos_url":"https://api.github.com/users/cjohannsen/repos","events_url":"https://api.github.com/users/cjohannsen/events{/privacy}","received_events_url":"https://api.github.com/users/cjohannsen/received_events","type":"User","site_admin":false},"body":"Der Teil mit dem TYPE_RANDOM sorgt dafür, dass im TWIG eine falsche Kategorie ID ankommt. In meinem Fall die ID 17","created_at":"2019-05-13T09:38:32Z","updated_at":"2019-05-13T09:38:39Z","html_url":"https://github.com/plentymarkets/plugin-io/pull/474#discussion_r283263508","pull_request_url":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/474","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/comments/283263508"},"html":{"href":"https://github.com/plentymarkets/plugin-io/pull/474#discussion_r283263508"},"pull_request":{"href":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/474"}}},"pull_request":{"url":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/474","id":277288912,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjc3Mjg4OTEy","html_url":"https://github.com/plentymarkets/plugin-io/pull/474","diff_url":"https://github.com/plentymarkets/plugin-io/pull/474.diff","patch_url":"https://github.com/plentymarkets/plugin-io/pull/474.patch","issue_url":"https://api.github.com/repos/plentymarkets/plugin-io/issues/474","number":474,"state":"open","locked":false,"title":"Sb single item/routing rework","user":{"login":"felixdausch","id":7404578,"node_id":"MDQ6VXNlcjc0MDQ1Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/7404578?v=4","gravatar_id":"","url":"https://api.github.com/users/felixdausch","html_url":"https://github.com/felixdausch","followers_url":"https://api.github.com/users/felixdausch/followers","following_url":"https://api.github.com/users/felixdausch/following{/other_user}","gists_url":"https://api.github.com/users/felixdausch/gists{/gist_id}","starred_url":"https://api.github.com/users/felixdausch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixdausch/subscriptions","organizations_url":"https://api.github.com/users/felixdausch/orgs","repos_url":"https://api.github.com/users/felixdausch/repos","events_url":"https://api.github.com/users/felixdausch/events{/privacy}","received_events_url":"https://api.github.com/users/felixdausch/received_events","type":"User","site_admin":false},"body":"### All changes meet the following requirements\r\n- [ ] Changelog entry was added\r\n- [ ] Changes have been tested\r\n- [ ] Plugin can be built\r\n\r\n@plentymarkets/ceres-io ","created_at":"2019-05-09T08:07:56Z","updated_at":"2019-05-13T09:38:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"052d7ad70875b17079f743435d1b1903fe55e39e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/474/commits","review_comments_url":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/474/comments","review_comment_url":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plentymarkets/plugin-io/issues/474/comments","statuses_url":"https://api.github.com/repos/plentymarkets/plugin-io/statuses/c50f7ca5bda01076dec154e8a616b0fc2a7940f7","head":{"label":"plentymarkets:sb_single_item/routing_rework","ref":"sb_single_item/routing_rework","sha":"c50f7ca5bda01076dec154e8a616b0fc2a7940f7","user":{"login":"plentymarkets","id":3379035,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzkwMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3379035?v=4","gravatar_id":"","url":"https://api.github.com/users/plentymarkets","html_url":"https://github.com/plentymarkets","followers_url":"https://api.github.com/users/plentymarkets/followers","following_url":"https://api.github.com/users/plentymarkets/following{/other_user}","gists_url":"https://api.github.com/users/plentymarkets/gists{/gist_id}","starred_url":"https://api.github.com/users/plentymarkets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plentymarkets/subscriptions","organizations_url":"https://api.github.com/users/plentymarkets/orgs","repos_url":"https://api.github.com/users/plentymarkets/repos","events_url":"https://api.github.com/users/plentymarkets/events{/privacy}","received_events_url":"https://api.github.com/users/plentymarkets/received_events","type":"Organization","site_admin":false},"repo":{"id":75632175,"node_id":"MDEwOlJlcG9zaXRvcnk3NTYzMjE3NQ==","name":"plugin-io","full_name":"plentymarkets/plugin-io","private":false,"owner":{"login":"plentymarkets","id":3379035,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzkwMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3379035?v=4","gravatar_id":"","url":"https://api.github.com/users/plentymarkets","html_url":"https://github.com/plentymarkets","followers_url":"https://api.github.com/users/plentymarkets/followers","following_url":"https://api.github.com/users/plentymarkets/following{/other_user}","gists_url":"https://api.github.com/users/plentymarkets/gists{/gist_id}","starred_url":"https://api.github.com/users/plentymarkets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plentymarkets/subscriptions","organizations_url":"https://api.github.com/users/plentymarkets/orgs","repos_url":"https://api.github.com/users/plentymarkets/repos","events_url":"https://api.github.com/users/plentymarkets/events{/privacy}","received_events_url":"https://api.github.com/users/plentymarkets/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/plentymarkets/plugin-io","description":null,"fork":false,"url":"https://api.github.com/repos/plentymarkets/plugin-io","forks_url":"https://api.github.com/repos/plentymarkets/plugin-io/forks","keys_url":"https://api.github.com/repos/plentymarkets/plugin-io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plentymarkets/plugin-io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plentymarkets/plugin-io/teams","hooks_url":"https://api.github.com/repos/plentymarkets/plugin-io/hooks","issue_events_url":"https://api.github.com/repos/plentymarkets/plugin-io/issues/events{/number}","events_url":"https://api.github.com/repos/plentymarkets/plugin-io/events","assignees_url":"https://api.github.com/repos/plentymarkets/plugin-io/assignees{/user}","branches_url":"https://api.github.com/repos/plentymarkets/plugin-io/branches{/branch}","tags_url":"https://api.github.com/repos/plentymarkets/plugin-io/tags","blobs_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/refs{/sha}","trees_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plentymarkets/plugin-io/statuses/{sha}","languages_url":"https://api.github.com/repos/plentymarkets/plugin-io/languages","stargazers_url":"https://api.github.com/repos/plentymarkets/plugin-io/stargazers","contributors_url":"https://api.github.com/repos/plentymarkets/plugin-io/contributors","subscribers_url":"https://api.github.com/repos/plentymarkets/plugin-io/subscribers","subscription_url":"https://api.github.com/repos/plentymarkets/plugin-io/subscription","commits_url":"https://api.github.com/repos/plentymarkets/plugin-io/commits{/sha}","git_commits_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/commits{/sha}","comments_url":"https://api.github.com/repos/plentymarkets/plugin-io/comments{/number}","issue_comment_url":"https://api.github.com/repos/plentymarkets/plugin-io/issues/comments{/number}","contents_url":"https://api.github.com/repos/plentymarkets/plugin-io/contents/{+path}","compare_url":"https://api.github.com/repos/plentymarkets/plugin-io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plentymarkets/plugin-io/merges","archive_url":"https://api.github.com/repos/plentymarkets/plugin-io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plentymarkets/plugin-io/downloads","issues_url":"https://api.github.com/repos/plentymarkets/plugin-io/issues{/number}","pulls_url":"https://api.github.com/repos/plentymarkets/plugin-io/pulls{/number}","milestones_url":"https://api.github.com/repos/plentymarkets/plugin-io/milestones{/number}","notifications_url":"https://api.github.com/repos/plentymarkets/plugin-io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plentymarkets/plugin-io/labels{/name}","releases_url":"https://api.github.com/repos/plentymarkets/plugin-io/releases{/id}","deployments_url":"https://api.github.com/repos/plentymarkets/plugin-io/deployments","created_at":"2016-12-05T14:25:24Z","updated_at":"2019-05-10T13:47:25Z","pushed_at":"2019-05-13T09:26:25Z","git_url":"git://github.com/plentymarkets/plugin-io.git","ssh_url":"git@github.com:plentymarkets/plugin-io.git","clone_url":"https://github.com/plentymarkets/plugin-io.git","svn_url":"https://github.com/plentymarkets/plugin-io","homepage":null,"size":3288,"stargazers_count":4,"watchers_count":4,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":31,"open_issues":6,"watchers":4,"default_branch":"stable"}},"base":{"label":"plentymarkets:feature/beta/sb_single_item","ref":"feature/beta/sb_single_item","sha":"7dca260bbc8bba95126c52f315b94272675a264d","user":{"login":"plentymarkets","id":3379035,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzkwMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3379035?v=4","gravatar_id":"","url":"https://api.github.com/users/plentymarkets","html_url":"https://github.com/plentymarkets","followers_url":"https://api.github.com/users/plentymarkets/followers","following_url":"https://api.github.com/users/plentymarkets/following{/other_user}","gists_url":"https://api.github.com/users/plentymarkets/gists{/gist_id}","starred_url":"https://api.github.com/users/plentymarkets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plentymarkets/subscriptions","organizations_url":"https://api.github.com/users/plentymarkets/orgs","repos_url":"https://api.github.com/users/plentymarkets/repos","events_url":"https://api.github.com/users/plentymarkets/events{/privacy}","received_events_url":"https://api.github.com/users/plentymarkets/received_events","type":"Organization","site_admin":false},"repo":{"id":75632175,"node_id":"MDEwOlJlcG9zaXRvcnk3NTYzMjE3NQ==","name":"plugin-io","full_name":"plentymarkets/plugin-io","private":false,"owner":{"login":"plentymarkets","id":3379035,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzkwMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3379035?v=4","gravatar_id":"","url":"https://api.github.com/users/plentymarkets","html_url":"https://github.com/plentymarkets","followers_url":"https://api.github.com/users/plentymarkets/followers","following_url":"https://api.github.com/users/plentymarkets/following{/other_user}","gists_url":"https://api.github.com/users/plentymarkets/gists{/gist_id}","starred_url":"https://api.github.com/users/plentymarkets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plentymarkets/subscriptions","organizations_url":"https://api.github.com/users/plentymarkets/orgs","repos_url":"https://api.github.com/users/plentymarkets/repos","events_url":"https://api.github.com/users/plentymarkets/events{/privacy}","received_events_url":"https://api.github.com/users/plentymarkets/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/plentymarkets/plugin-io","description":null,"fork":false,"url":"https://api.github.com/repos/plentymarkets/plugin-io","forks_url":"https://api.github.com/repos/plentymarkets/plugin-io/forks","keys_url":"https://api.github.com/repos/plentymarkets/plugin-io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plentymarkets/plugin-io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plentymarkets/plugin-io/teams","hooks_url":"https://api.github.com/repos/plentymarkets/plugin-io/hooks","issue_events_url":"https://api.github.com/repos/plentymarkets/plugin-io/issues/events{/number}","events_url":"https://api.github.com/repos/plentymarkets/plugin-io/events","assignees_url":"https://api.github.com/repos/plentymarkets/plugin-io/assignees{/user}","branches_url":"https://api.github.com/repos/plentymarkets/plugin-io/branches{/branch}","tags_url":"https://api.github.com/repos/plentymarkets/plugin-io/tags","blobs_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/refs{/sha}","trees_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plentymarkets/plugin-io/statuses/{sha}","languages_url":"https://api.github.com/repos/plentymarkets/plugin-io/languages","stargazers_url":"https://api.github.com/repos/plentymarkets/plugin-io/stargazers","contributors_url":"https://api.github.com/repos/plentymarkets/plugin-io/contributors","subscribers_url":"https://api.github.com/repos/plentymarkets/plugin-io/subscribers","subscription_url":"https://api.github.com/repos/plentymarkets/plugin-io/subscription","commits_url":"https://api.github.com/repos/plentymarkets/plugin-io/commits{/sha}","git_commits_url":"https://api.github.com/repos/plentymarkets/plugin-io/git/commits{/sha}","comments_url":"https://api.github.com/repos/plentymarkets/plugin-io/comments{/number}","issue_comment_url":"https://api.github.com/repos/plentymarkets/plugin-io/issues/comments{/number}","contents_url":"https://api.github.com/repos/plentymarkets/plugin-io/contents/{+path}","compare_url":"https://api.github.com/repos/plentymarkets/plugin-io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plentymarkets/plugin-io/merges","archive_url":"https://api.github.com/repos/plentymarkets/plugin-io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plentymarkets/plugin-io/downloads","issues_url":"https://api.github.com/repos/plentymarkets/plugin-io/issues{/number}","pulls_url":"https://api.github.com/repos/plentymarkets/plugin-io/pulls{/number}","milestones_url":"https://api.github.com/repos/plentymarkets/plugin-io/milestones{/number}","notifications_url":"https://api.github.com/repos/plentymarkets/plugin-io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plentymarkets/plugin-io/labels{/name}","releases_url":"https://api.github.com/repos/plentymarkets/plugin-io/releases{/id}","deployments_url":"https://api.github.com/repos/plentymarkets/plugin-io/deployments","created_at":"2016-12-05T14:25:24Z","updated_at":"2019-05-10T13:47:25Z","pushed_at":"2019-05-13T09:26:25Z","git_url":"git://github.com/plentymarkets/plugin-io.git","ssh_url":"git@github.com:plentymarkets/plugin-io.git","clone_url":"https://github.com/plentymarkets/plugin-io.git","svn_url":"https://github.com/plentymarkets/plugin-io","homepage":null,"size":3288,"stargazers_count":4,"watchers_count":4,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":31,"open_issues":6,"watchers":4,"default_branch":"stable"}},"_links":{"self":{"href":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/474"},"html":{"href":"https://github.com/plentymarkets/plugin-io/pull/474"},"issue":{"href":"https://api.github.com/repos/plentymarkets/plugin-io/issues/474"},"comments":{"href":"https://api.github.com/repos/plentymarkets/plugin-io/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plentymarkets/plugin-io/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/plentymarkets/plugin-io/statuses/c50f7ca5bda01076dec154e8a616b0fc2a7940f7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cjohannsen"}}