{"action":"created","comment":{"url":"https://api.github.com/repos/fago/entity/pulls/comments/83325387","pull_request_review_id":4177610,"id":83325387,"diff_hunk":"@@ -4,3 +4,84 @@\n  * @file\n  * Provides expanded entity APIs.\n  */\n+\n+use Drupal\\Core\\Entity\\EntityTypeInterface;\n+\n+/**\n+ * Gets the entity types which use bundle plugins.\n+ *\n+ * @return \\Drupal\\Core\\Entity\\EntityTypeInterface[]\n+ *   The entity types.\n+ */\n+function entity_get_bundle_plugin_entity_types() {\n+  $entity_types = \\Drupal::entityTypeManager()->getDefinitions();\n+  $entity_types = array_filter($entity_types, function (EntityTypeInterface $entity_type) {\n+    return $entity_type->hasHandlerClass('bundle_plugin');\n+  });\n+\n+  return $entity_types;","path":"entity.module","position":20,"original_position":19,"commit_id":"98d5b06205ca98b5001bcc2f9b39bebdcfc0ef6f","original_commit_id":"4012bf3c9857360de46298aaafc7d8051c1a0898","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":"Why? It's used when rebuilding the cached bundle or field data, it's not in any hot path. Plus, the function is not doing any I/O, it's just filtering an array.","created_at":"2016-10-13T22:25:06Z","updated_at":"2016-10-13T22:25:06Z","html_url":"https://github.com/fago/entity/pull/49#discussion_r83325387","pull_request_url":"https://api.github.com/repos/fago/entity/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/fago/entity/pulls/comments/83325387"},"html":{"href":"https://github.com/fago/entity/pull/49#discussion_r83325387"},"pull_request":{"href":"https://api.github.com/repos/fago/entity/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/fago/entity/pulls/49","id":89189212,"html_url":"https://github.com/fago/entity/pull/49","diff_url":"https://github.com/fago/entity/pull/49.diff","patch_url":"https://github.com/fago/entity/pull/49.patch","issue_url":"https://api.github.com/repos/fago/entity/issues/49","number":49,"state":"open","locked":false,"title":"Issue #2817751 by bojanz: Create an API for bundle plugins","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":"","created_at":"2016-10-13T12:08:51Z","updated_at":"2016-10-13T22:25:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03ca8195c1603ca3720cb3118a98c0883b2fd226","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fago/entity/pulls/49/commits","review_comments_url":"https://api.github.com/repos/fago/entity/pulls/49/comments","review_comment_url":"https://api.github.com/repos/fago/entity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fago/entity/issues/49/comments","statuses_url":"https://api.github.com/repos/fago/entity/statuses/98d5b06205ca98b5001bcc2f9b39bebdcfc0ef6f","head":{"label":"bojanz:bundle_plugin","ref":"bundle_plugin","sha":"98d5b06205ca98b5001bcc2f9b39bebdcfc0ef6f","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},"repo":{"id":44984096,"name":"entity","full_name":"bojanz/entity","owner":{"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},"private":false,"html_url":"https://github.com/bojanz/entity","description":"http://drupal.org/project/entity development for Drupal 8.","fork":true,"url":"https://api.github.com/repos/bojanz/entity","forks_url":"https://api.github.com/repos/bojanz/entity/forks","keys_url":"https://api.github.com/repos/bojanz/entity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bojanz/entity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bojanz/entity/teams","hooks_url":"https://api.github.com/repos/bojanz/entity/hooks","issue_events_url":"https://api.github.com/repos/bojanz/entity/issues/events{/number}","events_url":"https://api.github.com/repos/bojanz/entity/events","assignees_url":"https://api.github.com/repos/bojanz/entity/assignees{/user}","branches_url":"https://api.github.com/repos/bojanz/entity/branches{/branch}","tags_url":"https://api.github.com/repos/bojanz/entity/tags","blobs_url":"https://api.github.com/repos/bojanz/entity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bojanz/entity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bojanz/entity/git/refs{/sha}","trees_url":"https://api.github.com/repos/bojanz/entity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bojanz/entity/statuses/{sha}","languages_url":"https://api.github.com/repos/bojanz/entity/languages","stargazers_url":"https://api.github.com/repos/bojanz/entity/stargazers","contributors_url":"https://api.github.com/repos/bojanz/entity/contributors","subscribers_url":"https://api.github.com/repos/bojanz/entity/subscribers","subscription_url":"https://api.github.com/repos/bojanz/entity/subscription","commits_url":"https://api.github.com/repos/bojanz/entity/commits{/sha}","git_commits_url":"https://api.github.com/repos/bojanz/entity/git/commits{/sha}","comments_url":"https://api.github.com/repos/bojanz/entity/comments{/number}","issue_comment_url":"https://api.github.com/repos/bojanz/entity/issues/comments{/number}","contents_url":"https://api.github.com/repos/bojanz/entity/contents/{+path}","compare_url":"https://api.github.com/repos/bojanz/entity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bojanz/entity/merges","archive_url":"https://api.github.com/repos/bojanz/entity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bojanz/entity/downloads","issues_url":"https://api.github.com/repos/bojanz/entity/issues{/number}","pulls_url":"https://api.github.com/repos/bojanz/entity/pulls{/number}","milestones_url":"https://api.github.com/repos/bojanz/entity/milestones{/number}","notifications_url":"https://api.github.com/repos/bojanz/entity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bojanz/entity/labels{/name}","releases_url":"https://api.github.com/repos/bojanz/entity/releases{/id}","deployments_url":"https://api.github.com/repos/bojanz/entity/deployments","created_at":"2015-10-26T17:04:21Z","updated_at":"2016-02-15T00:26:12Z","pushed_at":"2016-10-13T22:18:55Z","git_url":"git://github.com/bojanz/entity.git","ssh_url":"git@github.com:bojanz/entity.git","clone_url":"https://github.com/bojanz/entity.git","svn_url":"https://github.com/bojanz/entity","homepage":null,"size":139,"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":"8.x-1.x"}},"base":{"label":"fago:8.x-1.x","ref":"8.x-1.x","sha":"879356bbf75608f86d8fb89d76a21dc1e99a39ae","user":{"login":"fago","id":132232,"avatar_url":"https://avatars.githubusercontent.com/u/132232?v=3","gravatar_id":"","url":"https://api.github.com/users/fago","html_url":"https://github.com/fago","followers_url":"https://api.github.com/users/fago/followers","following_url":"https://api.github.com/users/fago/following{/other_user}","gists_url":"https://api.github.com/users/fago/gists{/gist_id}","starred_url":"https://api.github.com/users/fago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fago/subscriptions","organizations_url":"https://api.github.com/users/fago/orgs","repos_url":"https://api.github.com/users/fago/repos","events_url":"https://api.github.com/users/fago/events{/privacy}","received_events_url":"https://api.github.com/users/fago/received_events","type":"User","site_admin":false},"repo":{"id":44748674,"name":"entity","full_name":"fago/entity","owner":{"login":"fago","id":132232,"avatar_url":"https://avatars.githubusercontent.com/u/132232?v=3","gravatar_id":"","url":"https://api.github.com/users/fago","html_url":"https://github.com/fago","followers_url":"https://api.github.com/users/fago/followers","following_url":"https://api.github.com/users/fago/following{/other_user}","gists_url":"https://api.github.com/users/fago/gists{/gist_id}","starred_url":"https://api.github.com/users/fago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fago/subscriptions","organizations_url":"https://api.github.com/users/fago/orgs","repos_url":"https://api.github.com/users/fago/repos","events_url":"https://api.github.com/users/fago/events{/privacy}","received_events_url":"https://api.github.com/users/fago/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fago/entity","description":"http://drupal.org/project/entity development for Drupal 8.","fork":false,"url":"https://api.github.com/repos/fago/entity","forks_url":"https://api.github.com/repos/fago/entity/forks","keys_url":"https://api.github.com/repos/fago/entity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fago/entity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fago/entity/teams","hooks_url":"https://api.github.com/repos/fago/entity/hooks","issue_events_url":"https://api.github.com/repos/fago/entity/issues/events{/number}","events_url":"https://api.github.com/repos/fago/entity/events","assignees_url":"https://api.github.com/repos/fago/entity/assignees{/user}","branches_url":"https://api.github.com/repos/fago/entity/branches{/branch}","tags_url":"https://api.github.com/repos/fago/entity/tags","blobs_url":"https://api.github.com/repos/fago/entity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fago/entity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fago/entity/git/refs{/sha}","trees_url":"https://api.github.com/repos/fago/entity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fago/entity/statuses/{sha}","languages_url":"https://api.github.com/repos/fago/entity/languages","stargazers_url":"https://api.github.com/repos/fago/entity/stargazers","contributors_url":"https://api.github.com/repos/fago/entity/contributors","subscribers_url":"https://api.github.com/repos/fago/entity/subscribers","subscription_url":"https://api.github.com/repos/fago/entity/subscription","commits_url":"https://api.github.com/repos/fago/entity/commits{/sha}","git_commits_url":"https://api.github.com/repos/fago/entity/git/commits{/sha}","comments_url":"https://api.github.com/repos/fago/entity/comments{/number}","issue_comment_url":"https://api.github.com/repos/fago/entity/issues/comments{/number}","contents_url":"https://api.github.com/repos/fago/entity/contents/{+path}","compare_url":"https://api.github.com/repos/fago/entity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fago/entity/merges","archive_url":"https://api.github.com/repos/fago/entity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fago/entity/downloads","issues_url":"https://api.github.com/repos/fago/entity/issues{/number}","pulls_url":"https://api.github.com/repos/fago/entity/pulls{/number}","milestones_url":"https://api.github.com/repos/fago/entity/milestones{/number}","notifications_url":"https://api.github.com/repos/fago/entity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fago/entity/labels{/name}","releases_url":"https://api.github.com/repos/fago/entity/releases{/id}","deployments_url":"https://api.github.com/repos/fago/entity/deployments","created_at":"2015-10-22T13:56:53Z","updated_at":"2016-09-14T03:38:10Z","pushed_at":"2016-10-13T22:18:55Z","git_url":"git://github.com/fago/entity.git","ssh_url":"git@github.com:fago/entity.git","clone_url":"https://github.com/fago/entity.git","svn_url":"https://github.com/fago/entity","homepage":null,"size":873,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":15,"forks":12,"open_issues":15,"watchers":2,"default_branch":"8.x-1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/fago/entity/pulls/49"},"html":{"href":"https://github.com/fago/entity/pull/49"},"issue":{"href":"https://api.github.com/repos/fago/entity/issues/49"},"comments":{"href":"https://api.github.com/repos/fago/entity/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/fago/entity/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/fago/entity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fago/entity/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/fago/entity/statuses/98d5b06205ca98b5001bcc2f9b39bebdcfc0ef6f"}}}}
{"actor":{"display_login":"bojanz"}}