{"action":"created","comment":{"url":"https://api.github.com/repos/commerceguys/commerce/pulls/comments/45657457","id":45657457,"diff_hunk":"@@ -0,0 +1,117 @@\n+<?php\n+\n+/**\n+ * @file\n+ * Contains \\Drupal\\commerce\\Plugin\\views\\field\\EntityBundle.\n+ */\n+\n+namespace Drupal\\commerce\\Plugin\\views\\field;\n+\n+use Drupal\\views\\Plugin\\views\\field\\Field;\n+use Drupal\\Core\\Form\\FormStateInterface;\n+use Symfony\\Component\\DependencyInjection\\ContainerInterface;\n+\n+/**\n+ * Field handler to display the entity bundle. It displays nothing if there's\n+ * only one bundle. This is useful if used together with the 'Hide empty\n+ * column' setting of the Table format plugin.\n+ *\n+ * @ingroup views_field_handlers\n+ *\n+ * @ViewsField(\"entity_bundle\")\n+ */\n+class EntityBundle extends Field {\n+\n+  /**\n+   * The entity type bundle info service.\n+   *\n+   * @var \\Drupal\\Core\\Entity\\EntityTypeBundleInfoInterface\n+   */\n+  protected $entityTypeBundleInfo;\n+\n+  /**\n+   * Constructs a \\Drupal\\field\\Plugin\\views\\field\\Field object.\n+   *\n+   * @param array $configuration\n+   *   A configuration array containing information about the plugin instance.\n+   * @param string $plugin_id\n+   *   The plugin_id for the plugin instance.\n+   * @param mixed $plugin_definition\n+   *   The plugin implementation definition.\n+   * @param \\Drupal\\Core\\Entity\\EntityManagerInterface $entity_manager\n+   *   The field formatter plugin manager.\n+   * @param \\Drupal\\Core\\Field\\FormatterPluginManager $formatter_plugin_manager\n+   *   The field formatter plugin manager.\n+   * @param \\Drupal\\Core\\Field\\FieldTypePluginManagerInterface $field_type_plugin_manager\n+   *   The field plugin type manager.\n+   * @param \\Drupal\\Core\\Language\\LanguageManagerInterface $language_manager\n+   *   The language manager.\n+   * @param \\Drupal\\Core\\Render\\RendererInterface $renderer\n+   *   The renderer.\n+   *  @param \\Drupal\\Core\\Entity\\EntityTypeBundleInfoInterface $entityTypeBundleInfo\n+   *    The entity type bundle info.\n+   *","path":"src/Plugin/views/field/EntityBundle.php","position":53,"original_position":53,"commit_id":"dcae16628ff3054c5ab07914d71bcb820da5afc9","original_commit_id":"dcae16628ff3054c5ab07914d71bcb820da5afc9","user":{"login":"bojanz","id":330162,"avatar_url":"https://avatars.githubusercontent.com/u/330162?v=3","gravatar_id":"","url":"https://api.github.com/users/bojanz","html_url":"https://github.com/bojanz","followers_url":"https://api.github.com/users/bojanz/followers","following_url":"https://api.github.com/users/bojanz/following{/other_user}","gists_url":"https://api.github.com/users/bojanz/gists{/gist_id}","starred_url":"https://api.github.com/users/bojanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bojanz/subscriptions","organizations_url":"https://api.github.com/users/bojanz/orgs","repos_url":"https://api.github.com/users/bojanz/repos","events_url":"https://api.github.com/users/bojanz/events{/privacy}","received_events_url":"https://api.github.com/users/bojanz/received_events","type":"User","site_admin":false},"body":"Extra space.","created_at":"2015-11-23T20:40:59Z","updated_at":"2015-11-23T20:40:59Z","html_url":"https://github.com/commerceguys/commerce/pull/272#discussion_r45657457","pull_request_url":"https://api.github.com/repos/commerceguys/commerce/pulls/272","_links":{"self":{"href":"https://api.github.com/repos/commerceguys/commerce/pulls/comments/45657457"},"html":{"href":"https://github.com/commerceguys/commerce/pull/272#discussion_r45657457"},"pull_request":{"href":"https://api.github.com/repos/commerceguys/commerce/pulls/272"}}},"pull_request":{"url":"https://api.github.com/repos/commerceguys/commerce/pulls/272","id":51212008,"html_url":"https://github.com/commerceguys/commerce/pull/272","diff_url":"https://github.com/commerceguys/commerce/pull/272.diff","patch_url":"https://github.com/commerceguys/commerce/pull/272.patch","issue_url":"https://api.github.com/repos/commerceguys/commerce/issues/272","number":272,"state":"open","locked":false,"title":"EntityBundle views handler","user":{"login":"czigor","id":648581,"avatar_url":"https://avatars.githubusercontent.com/u/648581?v=3","gravatar_id":"","url":"https://api.github.com/users/czigor","html_url":"https://github.com/czigor","followers_url":"https://api.github.com/users/czigor/followers","following_url":"https://api.github.com/users/czigor/following{/other_user}","gists_url":"https://api.github.com/users/czigor/gists{/gist_id}","starred_url":"https://api.github.com/users/czigor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czigor/subscriptions","organizations_url":"https://api.github.com/users/czigor/orgs","repos_url":"https://api.github.com/users/czigor/repos","events_url":"https://api.github.com/users/czigor/events{/privacy}","received_events_url":"https://api.github.com/users/czigor/received_events","type":"User","site_admin":false},"body":"https://www.drupal.org/node/2616450\r\n\r\nThe EntityBundle views field handler is available for every ContentEntity. The handler displays the bundle name if there are more than one bundles for that entity. If there's only one bundle then it displays nothing. ","created_at":"2015-11-19T11:45:17Z","updated_at":"2015-11-23T20:40:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e966d7fa11fd292b5faf67d4f256c05466e6b45","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/commerceguys/commerce/pulls/272/commits","review_comments_url":"https://api.github.com/repos/commerceguys/commerce/pulls/272/comments","review_comment_url":"https://api.github.com/repos/commerceguys/commerce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/commerceguys/commerce/issues/272/comments","statuses_url":"https://api.github.com/repos/commerceguys/commerce/statuses/dcae16628ff3054c5ab07914d71bcb820da5afc9","head":{"label":"czigor:bundle-views-handler-2616450","ref":"bundle-views-handler-2616450","sha":"dcae16628ff3054c5ab07914d71bcb820da5afc9","user":{"login":"czigor","id":648581,"avatar_url":"https://avatars.githubusercontent.com/u/648581?v=3","gravatar_id":"","url":"https://api.github.com/users/czigor","html_url":"https://github.com/czigor","followers_url":"https://api.github.com/users/czigor/followers","following_url":"https://api.github.com/users/czigor/following{/other_user}","gists_url":"https://api.github.com/users/czigor/gists{/gist_id}","starred_url":"https://api.github.com/users/czigor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czigor/subscriptions","organizations_url":"https://api.github.com/users/czigor/orgs","repos_url":"https://api.github.com/users/czigor/repos","events_url":"https://api.github.com/users/czigor/events{/privacy}","received_events_url":"https://api.github.com/users/czigor/received_events","type":"User","site_admin":false},"repo":{"id":44681611,"name":"commerce","full_name":"czigor/commerce","owner":{"login":"czigor","id":648581,"avatar_url":"https://avatars.githubusercontent.com/u/648581?v=3","gravatar_id":"","url":"https://api.github.com/users/czigor","html_url":"https://github.com/czigor","followers_url":"https://api.github.com/users/czigor/followers","following_url":"https://api.github.com/users/czigor/following{/other_user}","gists_url":"https://api.github.com/users/czigor/gists{/gist_id}","starred_url":"https://api.github.com/users/czigor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czigor/subscriptions","organizations_url":"https://api.github.com/users/czigor/orgs","repos_url":"https://api.github.com/users/czigor/repos","events_url":"https://api.github.com/users/czigor/events{/privacy}","received_events_url":"https://api.github.com/users/czigor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/czigor/commerce","description":"Drupal Commerce 8.x-2.x development","fork":true,"url":"https://api.github.com/repos/czigor/commerce","forks_url":"https://api.github.com/repos/czigor/commerce/forks","keys_url":"https://api.github.com/repos/czigor/commerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/czigor/commerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/czigor/commerce/teams","hooks_url":"https://api.github.com/repos/czigor/commerce/hooks","issue_events_url":"https://api.github.com/repos/czigor/commerce/issues/events{/number}","events_url":"https://api.github.com/repos/czigor/commerce/events","assignees_url":"https://api.github.com/repos/czigor/commerce/assignees{/user}","branches_url":"https://api.github.com/repos/czigor/commerce/branches{/branch}","tags_url":"https://api.github.com/repos/czigor/commerce/tags","blobs_url":"https://api.github.com/repos/czigor/commerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/czigor/commerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/czigor/commerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/czigor/commerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/czigor/commerce/statuses/{sha}","languages_url":"https://api.github.com/repos/czigor/commerce/languages","stargazers_url":"https://api.github.com/repos/czigor/commerce/stargazers","contributors_url":"https://api.github.com/repos/czigor/commerce/contributors","subscribers_url":"https://api.github.com/repos/czigor/commerce/subscribers","subscription_url":"https://api.github.com/repos/czigor/commerce/subscription","commits_url":"https://api.github.com/repos/czigor/commerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/czigor/commerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/czigor/commerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/czigor/commerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/czigor/commerce/contents/{+path}","compare_url":"https://api.github.com/repos/czigor/commerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/czigor/commerce/merges","archive_url":"https://api.github.com/repos/czigor/commerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/czigor/commerce/downloads","issues_url":"https://api.github.com/repos/czigor/commerce/issues{/number}","pulls_url":"https://api.github.com/repos/czigor/commerce/pulls{/number}","milestones_url":"https://api.github.com/repos/czigor/commerce/milestones{/number}","notifications_url":"https://api.github.com/repos/czigor/commerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/czigor/commerce/labels{/name}","releases_url":"https://api.github.com/repos/czigor/commerce/releases{/id}","created_at":"2015-10-21T14:23:58Z","updated_at":"2015-10-21T14:23:59Z","pushed_at":"2015-11-23T17:12:12Z","git_url":"git://github.com/czigor/commerce.git","ssh_url":"git@github.com:czigor/commerce.git","clone_url":"https://github.com/czigor/commerce.git","svn_url":"https://github.com/czigor/commerce","homepage":null,"size":1245,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"8.x-2.x"}},"base":{"label":"commerceguys:8.x-2.x","ref":"8.x-2.x","sha":"34dd25e0562a72f4928362a1d8a0d6f0baebb378","user":{"login":"commerceguys","id":183174,"avatar_url":"https://avatars.githubusercontent.com/u/183174?v=3","gravatar_id":"","url":"https://api.github.com/users/commerceguys","html_url":"https://github.com/commerceguys","followers_url":"https://api.github.com/users/commerceguys/followers","following_url":"https://api.github.com/users/commerceguys/following{/other_user}","gists_url":"https://api.github.com/users/commerceguys/gists{/gist_id}","starred_url":"https://api.github.com/users/commerceguys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commerceguys/subscriptions","organizations_url":"https://api.github.com/users/commerceguys/orgs","repos_url":"https://api.github.com/users/commerceguys/repos","events_url":"https://api.github.com/users/commerceguys/events{/privacy}","received_events_url":"https://api.github.com/users/commerceguys/received_events","type":"Organization","site_admin":false},"repo":{"id":21392057,"name":"commerce","full_name":"commerceguys/commerce","owner":{"login":"commerceguys","id":183174,"avatar_url":"https://avatars.githubusercontent.com/u/183174?v=3","gravatar_id":"","url":"https://api.github.com/users/commerceguys","html_url":"https://github.com/commerceguys","followers_url":"https://api.github.com/users/commerceguys/followers","following_url":"https://api.github.com/users/commerceguys/following{/other_user}","gists_url":"https://api.github.com/users/commerceguys/gists{/gist_id}","starred_url":"https://api.github.com/users/commerceguys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commerceguys/subscriptions","organizations_url":"https://api.github.com/users/commerceguys/orgs","repos_url":"https://api.github.com/users/commerceguys/repos","events_url":"https://api.github.com/users/commerceguys/events{/privacy}","received_events_url":"https://api.github.com/users/commerceguys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/commerceguys/commerce","description":"Drupal Commerce 8.x-2.x development","fork":false,"url":"https://api.github.com/repos/commerceguys/commerce","forks_url":"https://api.github.com/repos/commerceguys/commerce/forks","keys_url":"https://api.github.com/repos/commerceguys/commerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/commerceguys/commerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/commerceguys/commerce/teams","hooks_url":"https://api.github.com/repos/commerceguys/commerce/hooks","issue_events_url":"https://api.github.com/repos/commerceguys/commerce/issues/events{/number}","events_url":"https://api.github.com/repos/commerceguys/commerce/events","assignees_url":"https://api.github.com/repos/commerceguys/commerce/assignees{/user}","branches_url":"https://api.github.com/repos/commerceguys/commerce/branches{/branch}","tags_url":"https://api.github.com/repos/commerceguys/commerce/tags","blobs_url":"https://api.github.com/repos/commerceguys/commerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/commerceguys/commerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/commerceguys/commerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/commerceguys/commerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/commerceguys/commerce/statuses/{sha}","languages_url":"https://api.github.com/repos/commerceguys/commerce/languages","stargazers_url":"https://api.github.com/repos/commerceguys/commerce/stargazers","contributors_url":"https://api.github.com/repos/commerceguys/commerce/contributors","subscribers_url":"https://api.github.com/repos/commerceguys/commerce/subscribers","subscription_url":"https://api.github.com/repos/commerceguys/commerce/subscription","commits_url":"https://api.github.com/repos/commerceguys/commerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/commerceguys/commerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/commerceguys/commerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/commerceguys/commerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/commerceguys/commerce/contents/{+path}","compare_url":"https://api.github.com/repos/commerceguys/commerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/commerceguys/commerce/merges","archive_url":"https://api.github.com/repos/commerceguys/commerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/commerceguys/commerce/downloads","issues_url":"https://api.github.com/repos/commerceguys/commerce/issues{/number}","pulls_url":"https://api.github.com/repos/commerceguys/commerce/pulls{/number}","milestones_url":"https://api.github.com/repos/commerceguys/commerce/milestones{/number}","notifications_url":"https://api.github.com/repos/commerceguys/commerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/commerceguys/commerce/labels{/name}","releases_url":"https://api.github.com/repos/commerceguys/commerce/releases{/id}","created_at":"2014-07-01T15:05:51Z","updated_at":"2015-11-23T19:14:37Z","pushed_at":"2015-11-23T17:12:12Z","git_url":"git://github.com/commerceguys/commerce.git","ssh_url":"git@github.com:commerceguys/commerce.git","clone_url":"https://github.com/commerceguys/commerce.git","svn_url":"https://github.com/commerceguys/commerce","homepage":null,"size":1628,"stargazers_count":140,"watchers_count":140,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":9,"forks":69,"open_issues":9,"watchers":140,"default_branch":"8.x-2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/commerceguys/commerce/pulls/272"},"html":{"href":"https://github.com/commerceguys/commerce/pull/272"},"issue":{"href":"https://api.github.com/repos/commerceguys/commerce/issues/272"},"comments":{"href":"https://api.github.com/repos/commerceguys/commerce/issues/272/comments"},"review_comments":{"href":"https://api.github.com/repos/commerceguys/commerce/pulls/272/comments"},"review_comment":{"href":"https://api.github.com/repos/commerceguys/commerce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/commerceguys/commerce/pulls/272/commits"},"statuses":{"href":"https://api.github.com/repos/commerceguys/commerce/statuses/dcae16628ff3054c5ab07914d71bcb820da5afc9"}}}}