{"action":"created","comment":{"url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/comments/86894768","pull_request_review_id":7527614,"id":86894768,"diff_hunk":"@@ -0,0 +1,103 @@\n+<?php\n+\n+namespace Drupal\\commerce_product\\Entity\\ProductBundle;\n+\n+use Drupal\\commerce\\PurchasableEntityInterface;\n+use Drupal\\commerce_product\\Entity\\Product;\n+use Drupal\\Core\\Entity\\ContentEntityBase;\n+use Drupal\\Core\\Entity\\EntityTypeInterface;\n+use Drupal\\Core\\Field\\BaseFieldDefinition;\n+\n+/**\n+ * Defines the product entity class.\n+ *\n+ * @ContentEntityType(\n+ *   id = \"commerce_product_bundle\",\n+ *   label = @Translation(\"Product Bundle\"),\n+ *   label_singular = @Translation(\"product bundle\"),\n+ *   label_plural = @Translation(\"product bundles\"),\n+ *   label_count = @PluralTranslation(\n+ *     singular = \"@count product bundle\",\n+ *     plural = \"@count product bundles\",\n+ *   ),\n+ *   handlers = {\n+ *     \"event\" = \"Drupal\\commerce_product\\Event\\ProductEvent\",\n+ *     \"storage\" = \"Drupal\\commerce\\CommerceContentEntityStorage\",\n+ *     \"access\" = \"\\Drupal\\commerce\\EntityAccessControlHandler\",\n+ *     \"permission_provider\" = \"\\Drupal\\commerce\\EntityPermissionProvider\",\n+ *     \"view_builder\" = \"Drupal\\Core\\Entity\\EntityViewBuilder\",\n+ *     \"list_builder\" = \"Drupal\\commerce_product\\ProductListBuilder\",\n+ *     \"views_data\" = \"Drupal\\views\\EntityViewsData\",\n+ *     \"form\" = {\n+ *       \"default\" = \"Drupal\\commerce_product\\Form\\ProductForm\",\n+ *       \"add\" = \"Drupal\\commerce_product\\Form\\ProductForm\",\n+ *       \"edit\" = \"Drupal\\commerce_product\\Form\\ProductForm\",\n+ *       \"delete\" = \"Drupal\\Core\\Entity\\ContentEntityDeleteForm\"\n+ *     },\n+ *     \"route_provider\" = {\n+ *       \"default\" = \"Drupal\\Core\\Entity\\Routing\\AdminHtmlRouteProvider\",\n+ *       \"delete-multiple\" = \"Drupal\\entity\\Routing\\DeleteMultipleRouteProvider\",\n+ *     },\n+ *     \"translation\" = \"Drupal\\commerce_product\\ProductTranslationHandler\"\n+ *   },\n+ *   admin_permission = \"administer commerce_product_bundle\",\n+ *   permission_granularity = \"bundle\",\n+ *   fieldable = TRUE,\n+ *   translatable = TRUE,\n+ *   base_table = \"commerce_product_bundle\",\n+ *   data_table = \"commerce_product_bundle_data\",\n+ *   entity_keys = {\n+ *     \"id\" = \"product_bundle_id\",\n+ *     \"bundle\" = \"type\",\n+ *     \"label\" = \"title\",\n+ *     \"langcode\" = \"langcode\",\n+ *     \"uuid\" = \"uuid\",\n+ *     \"status\" = \"status\",\n+ *   },\n+ *   links = {\n+ *     \"canonical\" = \"/product/{commerce_product}\",\n+ *     \"add-page\" = \"/product/add\",\n+ *     \"add-form\" = \"/product/add/{commerce_product_type}\",\n+ *     \"edit-form\" = \"/product/{commerce_product}/edit\",\n+ *     \"delete-form\" = \"/product/{commerce_product}/delete\",\n+ *     \"delete-multiple-form\" = \"/admin/commerce/products/delete\",\n+ *     \"collection\" = \"/admin/commerce/products\"\n+ *   },\n+ *   bundle_entity_type = \"commerce_product_type\",\n+ *   field_ui_base_route = \"entity.commerce_product_type.edit_form\",\n+ * )\n+ */\n+\n+class ProductBundle extends ContentEntityBase implements ContentEntityInterface {\n+  //PurchasableEntityInterface\n+  /**\n+   * {@inheritdoc}\n+   */\n+  public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {\n+    $fields = parent::baseFieldDefinitions($entity_type);\n+\n+    $fields['product_bundle_item_id'] = BaseFieldDefinition::create('entity_reference')\n+      ->setLabel(t('Product'))\n+      ->setDescription(t('The included product variation.'))\n+      ->setSetting('target_type', 'commerce_product_bundle_item')\n+      ->setCardinality(BaseFieldDefinition::CARDINALITY_UNLIMITED)\n+      ->setDisplayConfigurable('view', TRUE);\n+\n+    // The price is not required because it's not guaranteed to be used\n+    // for storage (there might be a price per currency, role, country, etc).\n+    $fields['price'] = BaseFieldDefinition::create('commerce_price')\n+      ->setLabel(t('Price'))","path":"src/Entity/ProductBundle.php","position":null,"original_position":89,"commit_id":"36d1a2e8f460f3017789b4c3ff85a782ef9847c3","original_commit_id":"58844ad9bc81dbbb3204a7f2ad2e11729e3b130e","user":{"login":"steveoliver","id":145663,"avatar_url":"https://avatars.githubusercontent.com/u/145663?v=3","gravatar_id":"","url":"https://api.github.com/users/steveoliver","html_url":"https://github.com/steveoliver","followers_url":"https://api.github.com/users/steveoliver/followers","following_url":"https://api.github.com/users/steveoliver/following{/other_user}","gists_url":"https://api.github.com/users/steveoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/steveoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveoliver/subscriptions","organizations_url":"https://api.github.com/users/steveoliver/orgs","repos_url":"https://api.github.com/users/steveoliver/repos","events_url":"https://api.github.com/users/steveoliver/events{/privacy}","received_events_url":"https://api.github.com/users/steveoliver/received_events","type":"User","site_admin":false},"body":"Base price","created_at":"2016-11-07T23:37:16Z","updated_at":"2016-11-07T23:41:33Z","html_url":"https://github.com/steveoliver/commerce_product_bundle/pull/1#discussion_r86894768","pull_request_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/comments/86894768"},"html":{"href":"https://github.com/steveoliver/commerce_product_bundle/pull/1#discussion_r86894768"},"pull_request":{"href":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/1","id":92683276,"html_url":"https://github.com/steveoliver/commerce_product_bundle/pull/1","diff_url":"https://github.com/steveoliver/commerce_product_bundle/pull/1.diff","patch_url":"https://github.com/steveoliver/commerce_product_bundle/pull/1.patch","issue_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/issues/1","number":1,"state":"open","locked":false,"title":"add initial entity definitions","user":{"login":"kscheirer","id":283628,"avatar_url":"https://avatars.githubusercontent.com/u/283628?v=3","gravatar_id":"","url":"https://api.github.com/users/kscheirer","html_url":"https://github.com/kscheirer","followers_url":"https://api.github.com/users/kscheirer/followers","following_url":"https://api.github.com/users/kscheirer/following{/other_user}","gists_url":"https://api.github.com/users/kscheirer/gists{/gist_id}","starred_url":"https://api.github.com/users/kscheirer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kscheirer/subscriptions","organizations_url":"https://api.github.com/users/kscheirer/orgs","repos_url":"https://api.github.com/users/kscheirer/repos","events_url":"https://api.github.com/users/kscheirer/events{/privacy}","received_events_url":"https://api.github.com/users/kscheirer/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-07T23:04:56Z","updated_at":"2016-11-07T23:41:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bccb64454496a119c8d0118ff0d8c54aeb26361","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/1/commits","review_comments_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/1/comments","review_comment_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/issues/1/comments","statuses_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/statuses/36d1a2e8f460f3017789b4c3ff85a782ef9847c3","head":{"label":"kscheirer:8.x-1.x","ref":"8.x-1.x","sha":"36d1a2e8f460f3017789b4c3ff85a782ef9847c3","user":{"login":"kscheirer","id":283628,"avatar_url":"https://avatars.githubusercontent.com/u/283628?v=3","gravatar_id":"","url":"https://api.github.com/users/kscheirer","html_url":"https://github.com/kscheirer","followers_url":"https://api.github.com/users/kscheirer/followers","following_url":"https://api.github.com/users/kscheirer/following{/other_user}","gists_url":"https://api.github.com/users/kscheirer/gists{/gist_id}","starred_url":"https://api.github.com/users/kscheirer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kscheirer/subscriptions","organizations_url":"https://api.github.com/users/kscheirer/orgs","repos_url":"https://api.github.com/users/kscheirer/repos","events_url":"https://api.github.com/users/kscheirer/events{/privacy}","received_events_url":"https://api.github.com/users/kscheirer/received_events","type":"User","site_admin":false},"repo":{"id":73128325,"name":"commerce_product_bundle","full_name":"kscheirer/commerce_product_bundle","owner":{"login":"kscheirer","id":283628,"avatar_url":"https://avatars.githubusercontent.com/u/283628?v=3","gravatar_id":"","url":"https://api.github.com/users/kscheirer","html_url":"https://github.com/kscheirer","followers_url":"https://api.github.com/users/kscheirer/followers","following_url":"https://api.github.com/users/kscheirer/following{/other_user}","gists_url":"https://api.github.com/users/kscheirer/gists{/gist_id}","starred_url":"https://api.github.com/users/kscheirer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kscheirer/subscriptions","organizations_url":"https://api.github.com/users/kscheirer/orgs","repos_url":"https://api.github.com/users/kscheirer/repos","events_url":"https://api.github.com/users/kscheirer/events{/privacy}","received_events_url":"https://api.github.com/users/kscheirer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kscheirer/commerce_product_bundle","description":"Development of the commerce product module. PR welcome. Post Issues on d.o. please.","fork":true,"url":"https://api.github.com/repos/kscheirer/commerce_product_bundle","forks_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/forks","keys_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/teams","hooks_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/hooks","issue_events_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/issues/events{/number}","events_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/events","assignees_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/assignees{/user}","branches_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/branches{/branch}","tags_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/tags","blobs_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/languages","stargazers_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/stargazers","contributors_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/contributors","subscribers_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/subscribers","subscription_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/subscription","commits_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/contents/{+path}","compare_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/merges","archive_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/downloads","issues_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/issues{/number}","pulls_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/labels{/name}","releases_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/releases{/id}","deployments_url":"https://api.github.com/repos/kscheirer/commerce_product_bundle/deployments","created_at":"2016-11-07T22:53:26Z","updated_at":"2016-09-14T15:02:43Z","pushed_at":"2016-11-07T23:38:09Z","git_url":"git://github.com/kscheirer/commerce_product_bundle.git","ssh_url":"git@github.com:kscheirer/commerce_product_bundle.git","clone_url":"https://github.com/kscheirer/commerce_product_bundle.git","svn_url":"https://github.com/kscheirer/commerce_product_bundle","homepage":"https://www.drupal.org/project/issues/commerce_product_bundle","size":42,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"1.0"}},"base":{"label":"steveoliver:8.x-1.x","ref":"8.x-1.x","sha":"4ff78f4c22af3b56aa0c0277680417861d33b022","user":{"login":"steveoliver","id":145663,"avatar_url":"https://avatars.githubusercontent.com/u/145663?v=3","gravatar_id":"","url":"https://api.github.com/users/steveoliver","html_url":"https://github.com/steveoliver","followers_url":"https://api.github.com/users/steveoliver/followers","following_url":"https://api.github.com/users/steveoliver/following{/other_user}","gists_url":"https://api.github.com/users/steveoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/steveoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveoliver/subscriptions","organizations_url":"https://api.github.com/users/steveoliver/orgs","repos_url":"https://api.github.com/users/steveoliver/repos","events_url":"https://api.github.com/users/steveoliver/events{/privacy}","received_events_url":"https://api.github.com/users/steveoliver/received_events","type":"User","site_admin":false},"repo":{"id":72698984,"name":"commerce_product_bundle","full_name":"steveoliver/commerce_product_bundle","owner":{"login":"steveoliver","id":145663,"avatar_url":"https://avatars.githubusercontent.com/u/145663?v=3","gravatar_id":"","url":"https://api.github.com/users/steveoliver","html_url":"https://github.com/steveoliver","followers_url":"https://api.github.com/users/steveoliver/followers","following_url":"https://api.github.com/users/steveoliver/following{/other_user}","gists_url":"https://api.github.com/users/steveoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/steveoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveoliver/subscriptions","organizations_url":"https://api.github.com/users/steveoliver/orgs","repos_url":"https://api.github.com/users/steveoliver/repos","events_url":"https://api.github.com/users/steveoliver/events{/privacy}","received_events_url":"https://api.github.com/users/steveoliver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/steveoliver/commerce_product_bundle","description":"Development of the commerce product module. PR welcome. Post Issues on d.o. please.","fork":true,"url":"https://api.github.com/repos/steveoliver/commerce_product_bundle","forks_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/forks","keys_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/teams","hooks_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/hooks","issue_events_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/issues/events{/number}","events_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/events","assignees_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/assignees{/user}","branches_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/branches{/branch}","tags_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/tags","blobs_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/languages","stargazers_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/stargazers","contributors_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/contributors","subscribers_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/subscribers","subscription_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/subscription","commits_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/contents/{+path}","compare_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/merges","archive_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/downloads","issues_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/issues{/number}","pulls_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/labels{/name}","releases_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/releases{/id}","deployments_url":"https://api.github.com/repos/steveoliver/commerce_product_bundle/deployments","created_at":"2016-11-03T02:01:20Z","updated_at":"2016-09-14T15:02:43Z","pushed_at":"2016-11-07T23:38:11Z","git_url":"git://github.com/steveoliver/commerce_product_bundle.git","ssh_url":"git@github.com:steveoliver/commerce_product_bundle.git","clone_url":"https://github.com/steveoliver/commerce_product_bundle.git","svn_url":"https://github.com/steveoliver/commerce_product_bundle","homepage":"https://www.drupal.org/project/issues/commerce_product_bundle","size":42,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"1.0"}},"_links":{"self":{"href":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/1"},"html":{"href":"https://github.com/steveoliver/commerce_product_bundle/pull/1"},"issue":{"href":"https://api.github.com/repos/steveoliver/commerce_product_bundle/issues/1"},"comments":{"href":"https://api.github.com/repos/steveoliver/commerce_product_bundle/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/steveoliver/commerce_product_bundle/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/steveoliver/commerce_product_bundle/statuses/36d1a2e8f460f3017789b4c3ff85a782ef9847c3"}}}}
{"actor":{"display_login":"steveoliver"}}