{"action":"created","comment":{"url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/comments/30476129","id":30476129,"diff_hunk":"@@ -0,0 +1,283 @@\n+<?php\n+\n+/**\n+ * @package forms\n+ * @subpackage fields\n+ */\n+class StringTagField extends DropdownField {\n+\t/**\n+\t * @var array\n+\t */\n+\tpublic static $allowed_actions = array(\n+\t\t'suggest',\n+\t);\n+\n+\t/**\n+\t * @var bool\n+\t */\n+\tprotected $shouldLazyLoad = false;\n+\n+\t/**\n+\t * @var int\n+\t */\n+\tprotected $lazyLoadItemLimit = 10;\n+\n+\t/**\n+\t * @var null|DataObject\n+\t */\n+\tprotected $record;\n+\n+\t/**\n+\t * @param string $name\n+\t * @param string $title\n+\t * @param array|SS_List $source\n+\t * @param array|SS_List $value\n+\t */\n+\tpublic function __construct($name, $title = '', $source = array(), $value = array()) {\n+\t\tparent::__construct($name, $title, $source, $value);\n+\t}\n+\n+\t/**\n+\t * @return bool\n+\t */\n+\tpublic function getShouldLazyLoad() {\n+\t\treturn $this->shouldLazyLoad;\n+\t}\n+\n+\t/**\n+\t * @param bool $shouldLazyLoad\n+\t *\n+\t * @return static\n+\t */\n+\tpublic function setShouldLazyLoad($shouldLazyLoad) {\n+\t\t$this->shouldLazyLoad = $shouldLazyLoad;\n+\n+\t\treturn $this;\n+\t}\n+\n+\t/**\n+\t * @return int\n+\t */\n+\tpublic function getLazyLoadItemLimit() {\n+\t\treturn $this->lazyLoadItemLimit;\n+\t}\n+\n+\t/**\n+\t * @param int $lazyLoadItemLimit\n+\t *\n+\t * @return static\n+\t */\n+\tpublic function setLazyLoadItemLimit($lazyLoadItemLimit) {\n+\t\t$this->lazyLoadItemLimit = $lazyLoadItemLimit;\n+\n+\t\treturn $this;\n+\t}\n+\n+\t/**\n+\t * @return null|DataObject\n+\t */\n+\tpublic function getRecord() {\n+\t\tif($this->record) {\n+\t\t\treturn $this->record;\n+\t\t}\n+\n+\t\tif($form = $this->getForm()) {\n+\t\t\treturn $form->getRecord();\n+\t\t}\n+\n+\t\treturn null;\n+\t}\n+\n+\t/**\n+\t * @param DataObject $record\n+\t *\n+\t * @return $this\n+\t */\n+\tpublic function setRecord(DataObject $record) {\n+\t\t$this->record = $record;\n+\n+\t\treturn $this;\n+\t}\n+\n+\t/**\n+\t * {@inheritdoc}\n+\t */\n+\tpublic function Field($properties = array()) {\n+\t\tRequirements::css(TAG_FIELD_DIR . '/css/select2.min.css');\n+\t\tRequirements::css(TAG_FIELD_DIR . '/css/TagField.css');\n+\n+\t\tRequirements::javascript(TAG_FIELD_DIR . '/js/TagField.js');\n+\t\tRequirements::javascript(TAG_FIELD_DIR . '/js/select2.js');\n+\t\tRequirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');","path":"code/StringTagField.php","position":111,"original_position":111,"commit_id":"f97a5e39204e65ab0a7f5af38cdf9dd1f9c19b23","original_commit_id":"f97a5e39204e65ab0a7f5af38cdf9dd1f9c19b23","user":{"login":"tractorcow","id":936064,"avatar_url":"https://avatars.githubusercontent.com/u/936064?v=3","gravatar_id":"","url":"https://api.github.com/users/tractorcow","html_url":"https://github.com/tractorcow","followers_url":"https://api.github.com/users/tractorcow/followers","following_url":"https://api.github.com/users/tractorcow/following{/other_user}","gists_url":"https://api.github.com/users/tractorcow/gists{/gist_id}","starred_url":"https://api.github.com/users/tractorcow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tractorcow/subscriptions","organizations_url":"https://api.github.com/users/tractorcow/orgs","repos_url":"https://api.github.com/users/tractorcow/repos","events_url":"https://api.github.com/users/tractorcow/events{/privacy}","received_events_url":"https://api.github.com/users/tractorcow/received_events","type":"User","site_admin":false},"body":"I'd adjust the order so that dependant scripts appear after their dependencies.","created_at":"2015-05-17T23:22:06Z","updated_at":"2015-05-17T23:22:06Z","html_url":"https://github.com/silverstripe-labs/silverstripe-tagfield/pull/23#discussion_r30476129","pull_request_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/comments/30476129"},"html":{"href":"https://github.com/silverstripe-labs/silverstripe-tagfield/pull/23#discussion_r30476129"},"pull_request":{"href":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/23","id":35504689,"html_url":"https://github.com/silverstripe-labs/silverstripe-tagfield/pull/23","diff_url":"https://github.com/silverstripe-labs/silverstripe-tagfield/pull/23.diff","patch_url":"https://github.com/silverstripe-labs/silverstripe-tagfield/pull/23.patch","issue_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues/23","number":23,"state":"open","locked":false,"title":"Stabilized API","user":{"login":"assertchris","id":200609,"avatar_url":"https://avatars.githubusercontent.com/u/200609?v=3","gravatar_id":"","url":"https://api.github.com/users/assertchris","html_url":"https://github.com/assertchris","followers_url":"https://api.github.com/users/assertchris/followers","following_url":"https://api.github.com/users/assertchris/following{/other_user}","gists_url":"https://api.github.com/users/assertchris/gists{/gist_id}","starred_url":"https://api.github.com/users/assertchris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/assertchris/subscriptions","organizations_url":"https://api.github.com/users/assertchris/orgs","repos_url":"https://api.github.com/users/assertchris/repos","events_url":"https://api.github.com/users/assertchris/events{/privacy}","received_events_url":"https://api.github.com/users/assertchris/received_events","type":"User","site_admin":false},"body":"This must be merged at the same time as https://github.com/silverstripe/silverstripe-blog/pull/244","created_at":"2015-05-15T11:19:06Z","updated_at":"2015-05-17T23:22:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"611621e08d34754fe5b0ceb8e40337f27e2bd10f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/23/commits","review_comments_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/23/comments","review_comment_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues/23/comments","statuses_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/statuses/f97a5e39204e65ab0a7f5af38cdf9dd1f9c19b23","head":{"label":"silverstripe-labs:stabilize-api","ref":"stabilize-api","sha":"f97a5e39204e65ab0a7f5af38cdf9dd1f9c19b23","user":{"login":"silverstripe-labs","id":568043,"avatar_url":"https://avatars.githubusercontent.com/u/568043?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe-labs","html_url":"https://github.com/silverstripe-labs","followers_url":"https://api.github.com/users/silverstripe-labs/followers","following_url":"https://api.github.com/users/silverstripe-labs/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe-labs/subscriptions","organizations_url":"https://api.github.com/users/silverstripe-labs/orgs","repos_url":"https://api.github.com/users/silverstripe-labs/repos","events_url":"https://api.github.com/users/silverstripe-labs/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":1181344,"name":"silverstripe-tagfield","full_name":"silverstripe-labs/silverstripe-tagfield","owner":{"login":"silverstripe-labs","id":568043,"avatar_url":"https://avatars.githubusercontent.com/u/568043?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe-labs","html_url":"https://github.com/silverstripe-labs","followers_url":"https://api.github.com/users/silverstripe-labs/followers","following_url":"https://api.github.com/users/silverstripe-labs/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe-labs/subscriptions","organizations_url":"https://api.github.com/users/silverstripe-labs/orgs","repos_url":"https://api.github.com/users/silverstripe-labs/repos","events_url":"https://api.github.com/users/silverstripe-labs/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silverstripe-labs/silverstripe-tagfield","description":"SilverStripe module for editing tags (both in the CMS and other forms)","fork":false,"url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield","forks_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/forks","keys_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/teams","hooks_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/hooks","issue_events_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/events","assignees_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/tags","blobs_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/languages","stargazers_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/stargazers","contributors_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/contributors","subscribers_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/subscribers","subscription_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/subscription","commits_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/merges","archive_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/downloads","issues_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/releases{/id}","created_at":"2010-12-19T07:25:43Z","updated_at":"2015-04-19T10:55:41Z","pushed_at":"2015-05-17T22:16:32Z","git_url":"git://github.com/silverstripe-labs/silverstripe-tagfield.git","ssh_url":"git@github.com:silverstripe-labs/silverstripe-tagfield.git","clone_url":"https://github.com/silverstripe-labs/silverstripe-tagfield.git","svn_url":"https://github.com/silverstripe-labs/silverstripe-tagfield","homepage":"http://silverstripe.org/tag-field-module","size":601,"stargazers_count":38,"watchers_count":38,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":9,"forks":23,"open_issues":9,"watchers":38,"default_branch":"master"}},"base":{"label":"silverstripe-labs:develop","ref":"develop","sha":"018193259134a54ebc07aaa4444adef635dfa19d","user":{"login":"silverstripe-labs","id":568043,"avatar_url":"https://avatars.githubusercontent.com/u/568043?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe-labs","html_url":"https://github.com/silverstripe-labs","followers_url":"https://api.github.com/users/silverstripe-labs/followers","following_url":"https://api.github.com/users/silverstripe-labs/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe-labs/subscriptions","organizations_url":"https://api.github.com/users/silverstripe-labs/orgs","repos_url":"https://api.github.com/users/silverstripe-labs/repos","events_url":"https://api.github.com/users/silverstripe-labs/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":1181344,"name":"silverstripe-tagfield","full_name":"silverstripe-labs/silverstripe-tagfield","owner":{"login":"silverstripe-labs","id":568043,"avatar_url":"https://avatars.githubusercontent.com/u/568043?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe-labs","html_url":"https://github.com/silverstripe-labs","followers_url":"https://api.github.com/users/silverstripe-labs/followers","following_url":"https://api.github.com/users/silverstripe-labs/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe-labs/subscriptions","organizations_url":"https://api.github.com/users/silverstripe-labs/orgs","repos_url":"https://api.github.com/users/silverstripe-labs/repos","events_url":"https://api.github.com/users/silverstripe-labs/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silverstripe-labs/silverstripe-tagfield","description":"SilverStripe module for editing tags (both in the CMS and other forms)","fork":false,"url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield","forks_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/forks","keys_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/teams","hooks_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/hooks","issue_events_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/events","assignees_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/tags","blobs_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/languages","stargazers_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/stargazers","contributors_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/contributors","subscribers_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/subscribers","subscription_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/subscription","commits_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/merges","archive_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/downloads","issues_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/releases{/id}","created_at":"2010-12-19T07:25:43Z","updated_at":"2015-04-19T10:55:41Z","pushed_at":"2015-05-17T22:16:32Z","git_url":"git://github.com/silverstripe-labs/silverstripe-tagfield.git","ssh_url":"git@github.com:silverstripe-labs/silverstripe-tagfield.git","clone_url":"https://github.com/silverstripe-labs/silverstripe-tagfield.git","svn_url":"https://github.com/silverstripe-labs/silverstripe-tagfield","homepage":"http://silverstripe.org/tag-field-module","size":601,"stargazers_count":38,"watchers_count":38,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":9,"forks":23,"open_issues":9,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/23"},"html":{"href":"https://github.com/silverstripe-labs/silverstripe-tagfield/pull/23"},"issue":{"href":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues/23"},"comments":{"href":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/silverstripe-labs/silverstripe-tagfield/statuses/f97a5e39204e65ab0a7f5af38cdf9dd1f9c19b23"}}}}