{"action":"created","comment":{"url":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/comments/57862609","id":57862609,"diff_hunk":"@@ -0,0 +1,203 @@\n+<?php\n+\n+/**\n+ * @file\n+ * Contains \\Drupal\\dbcdk_community\\Form\\QuarantineEditForm.\n+ */\n+\n+namespace Drupal\\dbcdk_community\\Form;\n+\n+use DBCDK\\CommunityServices\\Api\\QuarantineApi;\n+use DBCDK\\CommunityServices\\ApiException;\n+use DBCDK\\CommunityServices\\Model\\Profile;\n+use DBCDK\\CommunityServices\\Model\\Quarantine;\n+use Symfony\\Component\\DependencyInjection\\ContainerInterface;\n+use Drupal\\Core\\DependencyInjection\\ContainerInjectionInterface;\n+use Drupal\\Core\\Form\\FormBase;\n+use Drupal\\Core\\Form\\FormStateInterface;\n+use Drupal\\Core\\Url;\n+\n+/**\n+ * Edit a Community Quarantine.\n+ */\n+class QuarantineEditForm extends FormBase implements ContainerInjectionInterface {\n+\n+  /**\n+   * The date format the Community Client expects.\n+   */\n+  const DATE_FORMAT = 'Y-m-d';\n+\n+  /**\n+   * The Community Service Quarantine object from the context.\n+   *\n+   * @var \\DBCDK\\CommunityServices\\Model\\Quarantine $quarantine\n+   */\n+  protected $quarantine;\n+\n+  /**\n+   * The Community Service Profile from the Quarantined ID.\n+   *\n+   * @var \\DBCDK\\CommunityServices\\Model\\Profile $profile\n+   */\n+  protected $profile;\n+\n+  /**\n+   * The DBCDK Community Service Quarantine API.\n+   *\n+   * @var \\DBCDK\\CommunityServices\\Api\\QuarantineApi $quarantineApi\n+   */\n+  protected $quarantineApi;\n+\n+  /**\n+   * QuarantineEditForm constructor.\n+   *\n+   * @param \\DBCDK\\CommunityServices\\Model\\Quarantine $quarantine\n+   *   The Community Quarantine we wish to alter.\n+   * @param \\DBCDK\\CommunityServices\\Model\\Profile $profile\n+   *   The Community Profile we wish to alter a quarantine on.\n+   * @param \\DBCDK\\CommunityServices\\Api\\QuarantineApi $quarantine_api\n+   *   The Community Service Quarantine API.\n+   */\n+  public function __construct(Quarantine $quarantine, Profile $profile, QuarantineApi $quarantine_api) {\n+    $this->quarantine = $quarantine;\n+    $this->profile = $profile;\n+    $this->quarantineApi = $quarantine_api;\n+  }\n+\n+  /**\n+   * {@inheritdoc}\n+   */\n+  public static function create(ContainerInterface $container) {\n+    try {\n+      /* @var \\DBCDK\\CommunityServices\\Api\\QuarantineApi */\n+      $quarantine_api = $container->get('dbcdk_community.api.quarantine');\n+      $quarantine_filter = [\n+        'where' => [\n+          'id' => $container->get('request_stack')->getCurrentRequest()->get('quarantine_id'),\n+        ],\n+      ];\n+      $quarantine = $quarantine_api->quarantineFindOne(json_encode($quarantine_filter));","path":"web/modules/custom/dbcdk_community/src/Form/QuarantineEditForm.php","position":79,"original_position":79,"commit_id":"e3dac174b8504a64e8b6202a9a0eeafc3632b22b","original_commit_id":"e3dac174b8504a64e8b6202a9a0eeafc3632b22b","user":{"login":"kasperg","id":73966,"avatar_url":"https://avatars.githubusercontent.com/u/73966?v=3","gravatar_id":"","url":"https://api.github.com/users/kasperg","html_url":"https://github.com/kasperg","followers_url":"https://api.github.com/users/kasperg/followers","following_url":"https://api.github.com/users/kasperg/following{/other_user}","gists_url":"https://api.github.com/users/kasperg/gists{/gist_id}","starred_url":"https://api.github.com/users/kasperg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasperg/subscriptions","organizations_url":"https://api.github.com/users/kasperg/orgs","repos_url":"https://api.github.com/users/kasperg/repos","events_url":"https://api.github.com/users/kasperg/events{/privacy}","received_events_url":"https://api.github.com/users/kasperg/received_events","type":"User","site_admin":false},"body":"There is also [`quarantineFindById`](https://github.com/DBCDK/biblo-admin/blob/f1abf0227666af4a883b46cace763fb6ca7ad407/lib/client/src/Api/QuarantineApi.php#L800-L800).","created_at":"2016-03-30T09:50:18Z","updated_at":"2016-03-30T09:50:18Z","html_url":"https://github.com/DBCDK/biblo-admin/pull/38#discussion_r57862609","pull_request_url":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/comments/57862609"},"html":{"href":"https://github.com/DBCDK/biblo-admin/pull/38#discussion_r57862609"},"pull_request":{"href":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/38","id":64436992,"html_url":"https://github.com/DBCDK/biblo-admin/pull/38","diff_url":"https://github.com/DBCDK/biblo-admin/pull/38.diff","patch_url":"https://github.com/DBCDK/biblo-admin/pull/38.patch","issue_url":"https://api.github.com/repos/DBCDK/biblo-admin/issues/38","number":38,"state":"open","locked":false,"title":"Quarantines","user":{"login":"kallehauge","id":3846700,"avatar_url":"https://avatars.githubusercontent.com/u/3846700?v=3","gravatar_id":"","url":"https://api.github.com/users/kallehauge","html_url":"https://github.com/kallehauge","followers_url":"https://api.github.com/users/kallehauge/followers","following_url":"https://api.github.com/users/kallehauge/following{/other_user}","gists_url":"https://api.github.com/users/kallehauge/gists{/gist_id}","starred_url":"https://api.github.com/users/kallehauge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kallehauge/subscriptions","organizations_url":"https://api.github.com/users/kallehauge/orgs","repos_url":"https://api.github.com/users/kallehauge/repos","events_url":"https://api.github.com/users/kallehauge/events{/privacy}","received_events_url":"https://api.github.com/users/kallehauge/received_events","type":"User","site_admin":false},"body":"This PR contains the following changes:\r\n\r\n* Add a Create Quarantine Form\r\n* Add a Edit Quarantine Form\r\n* Add a Quarantines Block to the Profile page\r\n* Generalise DBCDK Community date format since the usage outgrew \"birthdays\"","created_at":"2016-03-29T09:31:38Z","updated_at":"2016-03-30T09:50:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ed279500ac896ffe7b97c7ab0ff3a91872b1e75","assignee":{"login":"kasperg","id":73966,"avatar_url":"https://avatars.githubusercontent.com/u/73966?v=3","gravatar_id":"","url":"https://api.github.com/users/kasperg","html_url":"https://github.com/kasperg","followers_url":"https://api.github.com/users/kasperg/followers","following_url":"https://api.github.com/users/kasperg/following{/other_user}","gists_url":"https://api.github.com/users/kasperg/gists{/gist_id}","starred_url":"https://api.github.com/users/kasperg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasperg/subscriptions","organizations_url":"https://api.github.com/users/kasperg/orgs","repos_url":"https://api.github.com/users/kasperg/repos","events_url":"https://api.github.com/users/kasperg/events{/privacy}","received_events_url":"https://api.github.com/users/kasperg/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/38/commits","review_comments_url":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/38/comments","review_comment_url":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DBCDK/biblo-admin/issues/38/comments","statuses_url":"https://api.github.com/repos/DBCDK/biblo-admin/statuses/e3dac174b8504a64e8b6202a9a0eeafc3632b22b","head":{"label":"DBCDK:feature/quarantine-forms","ref":"feature/quarantine-forms","sha":"e3dac174b8504a64e8b6202a9a0eeafc3632b22b","user":{"login":"DBCDK","id":555633,"avatar_url":"https://avatars.githubusercontent.com/u/555633?v=3","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"repo":{"id":51740597,"name":"biblo-admin","full_name":"DBCDK/biblo-admin","owner":{"login":"DBCDK","id":555633,"avatar_url":"https://avatars.githubusercontent.com/u/555633?v=3","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DBCDK/biblo-admin","description":"Admin application for biblo","fork":false,"url":"https://api.github.com/repos/DBCDK/biblo-admin","forks_url":"https://api.github.com/repos/DBCDK/biblo-admin/forks","keys_url":"https://api.github.com/repos/DBCDK/biblo-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DBCDK/biblo-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DBCDK/biblo-admin/teams","hooks_url":"https://api.github.com/repos/DBCDK/biblo-admin/hooks","issue_events_url":"https://api.github.com/repos/DBCDK/biblo-admin/issues/events{/number}","events_url":"https://api.github.com/repos/DBCDK/biblo-admin/events","assignees_url":"https://api.github.com/repos/DBCDK/biblo-admin/assignees{/user}","branches_url":"https://api.github.com/repos/DBCDK/biblo-admin/branches{/branch}","tags_url":"https://api.github.com/repos/DBCDK/biblo-admin/tags","blobs_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DBCDK/biblo-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/DBCDK/biblo-admin/languages","stargazers_url":"https://api.github.com/repos/DBCDK/biblo-admin/stargazers","contributors_url":"https://api.github.com/repos/DBCDK/biblo-admin/contributors","subscribers_url":"https://api.github.com/repos/DBCDK/biblo-admin/subscribers","subscription_url":"https://api.github.com/repos/DBCDK/biblo-admin/subscription","commits_url":"https://api.github.com/repos/DBCDK/biblo-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/DBCDK/biblo-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/DBCDK/biblo-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/DBCDK/biblo-admin/contents/{+path}","compare_url":"https://api.github.com/repos/DBCDK/biblo-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DBCDK/biblo-admin/merges","archive_url":"https://api.github.com/repos/DBCDK/biblo-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DBCDK/biblo-admin/downloads","issues_url":"https://api.github.com/repos/DBCDK/biblo-admin/issues{/number}","pulls_url":"https://api.github.com/repos/DBCDK/biblo-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/DBCDK/biblo-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/DBCDK/biblo-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DBCDK/biblo-admin/labels{/name}","releases_url":"https://api.github.com/repos/DBCDK/biblo-admin/releases{/id}","deployments_url":"https://api.github.com/repos/DBCDK/biblo-admin/deployments","created_at":"2016-02-15T08:19:28Z","updated_at":"2016-02-15T12:37:38Z","pushed_at":"2016-03-30T09:44:51Z","git_url":"git://github.com/DBCDK/biblo-admin.git","ssh_url":"git@github.com:DBCDK/biblo-admin.git","clone_url":"https://github.com/DBCDK/biblo-admin.git","svn_url":"https://github.com/DBCDK/biblo-admin","homepage":null,"size":489,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"DBCDK:develop","ref":"develop","sha":"61552d4bd3f4ab3e0b83c07fdfb6fdc2e3d06071","user":{"login":"DBCDK","id":555633,"avatar_url":"https://avatars.githubusercontent.com/u/555633?v=3","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"repo":{"id":51740597,"name":"biblo-admin","full_name":"DBCDK/biblo-admin","owner":{"login":"DBCDK","id":555633,"avatar_url":"https://avatars.githubusercontent.com/u/555633?v=3","gravatar_id":"","url":"https://api.github.com/users/DBCDK","html_url":"https://github.com/DBCDK","followers_url":"https://api.github.com/users/DBCDK/followers","following_url":"https://api.github.com/users/DBCDK/following{/other_user}","gists_url":"https://api.github.com/users/DBCDK/gists{/gist_id}","starred_url":"https://api.github.com/users/DBCDK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBCDK/subscriptions","organizations_url":"https://api.github.com/users/DBCDK/orgs","repos_url":"https://api.github.com/users/DBCDK/repos","events_url":"https://api.github.com/users/DBCDK/events{/privacy}","received_events_url":"https://api.github.com/users/DBCDK/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DBCDK/biblo-admin","description":"Admin application for biblo","fork":false,"url":"https://api.github.com/repos/DBCDK/biblo-admin","forks_url":"https://api.github.com/repos/DBCDK/biblo-admin/forks","keys_url":"https://api.github.com/repos/DBCDK/biblo-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DBCDK/biblo-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DBCDK/biblo-admin/teams","hooks_url":"https://api.github.com/repos/DBCDK/biblo-admin/hooks","issue_events_url":"https://api.github.com/repos/DBCDK/biblo-admin/issues/events{/number}","events_url":"https://api.github.com/repos/DBCDK/biblo-admin/events","assignees_url":"https://api.github.com/repos/DBCDK/biblo-admin/assignees{/user}","branches_url":"https://api.github.com/repos/DBCDK/biblo-admin/branches{/branch}","tags_url":"https://api.github.com/repos/DBCDK/biblo-admin/tags","blobs_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DBCDK/biblo-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/DBCDK/biblo-admin/languages","stargazers_url":"https://api.github.com/repos/DBCDK/biblo-admin/stargazers","contributors_url":"https://api.github.com/repos/DBCDK/biblo-admin/contributors","subscribers_url":"https://api.github.com/repos/DBCDK/biblo-admin/subscribers","subscription_url":"https://api.github.com/repos/DBCDK/biblo-admin/subscription","commits_url":"https://api.github.com/repos/DBCDK/biblo-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/DBCDK/biblo-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/DBCDK/biblo-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/DBCDK/biblo-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/DBCDK/biblo-admin/contents/{+path}","compare_url":"https://api.github.com/repos/DBCDK/biblo-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DBCDK/biblo-admin/merges","archive_url":"https://api.github.com/repos/DBCDK/biblo-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DBCDK/biblo-admin/downloads","issues_url":"https://api.github.com/repos/DBCDK/biblo-admin/issues{/number}","pulls_url":"https://api.github.com/repos/DBCDK/biblo-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/DBCDK/biblo-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/DBCDK/biblo-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DBCDK/biblo-admin/labels{/name}","releases_url":"https://api.github.com/repos/DBCDK/biblo-admin/releases{/id}","deployments_url":"https://api.github.com/repos/DBCDK/biblo-admin/deployments","created_at":"2016-02-15T08:19:28Z","updated_at":"2016-02-15T12:37:38Z","pushed_at":"2016-03-30T09:44:51Z","git_url":"git://github.com/DBCDK/biblo-admin.git","ssh_url":"git@github.com:DBCDK/biblo-admin.git","clone_url":"https://github.com/DBCDK/biblo-admin.git","svn_url":"https://github.com/DBCDK/biblo-admin","homepage":null,"size":489,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/38"},"html":{"href":"https://github.com/DBCDK/biblo-admin/pull/38"},"issue":{"href":"https://api.github.com/repos/DBCDK/biblo-admin/issues/38"},"comments":{"href":"https://api.github.com/repos/DBCDK/biblo-admin/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DBCDK/biblo-admin/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/DBCDK/biblo-admin/statuses/e3dac174b8504a64e8b6202a9a0eeafc3632b22b"}}}}