{"action":"created","comment":{"url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/comments/57768971","id":57768971,"diff_hunk":"@@ -5,7 +5,96 @@\n trait OptionsAwareTrait\n {\n     /**\n-     * Injects classes into `$options['class']` when they don't already exist.\n+     * A list of allowed styles for buttons.\n+     *\n+     * @var array\n+     */\n+    public $ButtonStyles = [\n+        'default', 'btn-default',\n+        'success', 'btn-success',\n+        'warning', 'btn-warning',\n+        'danger', 'btn-danger',\n+        'info', 'btn-info',\n+        'primary', 'btn-primary'\n+    ];\n+\n+    /**\n+     * A mapping of aliases for button styles.\n+     *\n+     * @var array\n+     */\n+    public $ButtonStyleAliases = [\n+        'default' => 'btn-default',\n+        'success' => 'btn-success',\n+        'warning' => 'btn-warning',\n+        'danger' => 'btn-danger',\n+        'info' => 'btn-info',\n+        'primary' => 'btn-primary'\n+    ];\n+\n+    /**\n+     * Contains the logic for applying style classes for buttons.\n+     *\n+     * @param array $data An array of HTML attributes and options.\n+     * @return array An array of HTML attributes and options.\n+     */\n+    public function applyButtonStyles(array $data)","path":"src/View/Helper/OptionsAwareTrait.php","position":38,"original_position":38,"commit_id":"d642032296d95d1999a8102cd3f2b9370626d8c9","original_commit_id":"0b855e1ea46fa0d3ba809781291e98c12421de68","user":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?v=3","gravatar_id":"","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"body":"This method name change still needs to be addressed :)","created_at":"2016-03-29T17:55:36Z","updated_at":"2016-03-29T17:55:36Z","html_url":"https://github.com/FriendsOfCake/bootstrap-ui/pull/147#discussion_r57768971","pull_request_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/147","_links":{"self":{"href":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/comments/57768971"},"html":{"href":"https://github.com/FriendsOfCake/bootstrap-ui/pull/147#discussion_r57768971"},"pull_request":{"href":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/147"}}},"pull_request":{"url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/147","id":64381387,"html_url":"https://github.com/FriendsOfCake/bootstrap-ui/pull/147","diff_url":"https://github.com/FriendsOfCake/bootstrap-ui/pull/147.diff","patch_url":"https://github.com/FriendsOfCake/bootstrap-ui/pull/147.patch","issue_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/issues/147","number":147,"state":"open","locked":false,"title":"added button tests and support for btn-default as a default style.","user":{"login":"thinkingmedia","id":551022,"avatar_url":"https://avatars.githubusercontent.com/u/551022?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkingmedia","html_url":"https://github.com/thinkingmedia","followers_url":"https://api.github.com/users/thinkingmedia/followers","following_url":"https://api.github.com/users/thinkingmedia/following{/other_user}","gists_url":"https://api.github.com/users/thinkingmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkingmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkingmedia/subscriptions","organizations_url":"https://api.github.com/users/thinkingmedia/orgs","repos_url":"https://api.github.com/users/thinkingmedia/repos","events_url":"https://api.github.com/users/thinkingmedia/events{/privacy}","received_events_url":"https://api.github.com/users/thinkingmedia/received_events","type":"User","site_admin":false},"body":"This PR improves buttons.\r\n\r\n- closes #143 as button widget now assigns `btn-default` if it's missing.\r\n- ButtonWidget now checks for both `primary` and `btn-primary` classname patterns in class attribute.\r\n- Adds unit test coverage for ButtonWidget\r\n- Fixes `btn-default` for `Form->submit()` which didn't use ButtonWidget.\r\n\r\nI added a public static method to ButtonWidget which is called from FormHelper. So that there is only one function that handles class styles for buttons. I'm not sure if a helper should call a static on a widget. Seems dirty to me. Is this okay for now?","created_at":"2016-03-28T21:45:57Z","updated_at":"2016-03-29T17:55:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"699d93d3f755efad6faa623a276bbe10942f2d44","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/147/commits","review_comments_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/147/comments","review_comment_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/issues/147/comments","statuses_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/statuses/d642032296d95d1999a8102cd3f2b9370626d8c9","head":{"label":"thinkingmedia:thinkingmedia/widget-tests","ref":"thinkingmedia/widget-tests","sha":"d642032296d95d1999a8102cd3f2b9370626d8c9","user":{"login":"thinkingmedia","id":551022,"avatar_url":"https://avatars.githubusercontent.com/u/551022?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkingmedia","html_url":"https://github.com/thinkingmedia","followers_url":"https://api.github.com/users/thinkingmedia/followers","following_url":"https://api.github.com/users/thinkingmedia/following{/other_user}","gists_url":"https://api.github.com/users/thinkingmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkingmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkingmedia/subscriptions","organizations_url":"https://api.github.com/users/thinkingmedia/orgs","repos_url":"https://api.github.com/users/thinkingmedia/repos","events_url":"https://api.github.com/users/thinkingmedia/events{/privacy}","received_events_url":"https://api.github.com/users/thinkingmedia/received_events","type":"User","site_admin":false},"repo":{"id":54861176,"name":"bootstrap-ui","full_name":"thinkingmedia/bootstrap-ui","owner":{"login":"thinkingmedia","id":551022,"avatar_url":"https://avatars.githubusercontent.com/u/551022?v=3","gravatar_id":"","url":"https://api.github.com/users/thinkingmedia","html_url":"https://github.com/thinkingmedia","followers_url":"https://api.github.com/users/thinkingmedia/followers","following_url":"https://api.github.com/users/thinkingmedia/following{/other_user}","gists_url":"https://api.github.com/users/thinkingmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkingmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkingmedia/subscriptions","organizations_url":"https://api.github.com/users/thinkingmedia/orgs","repos_url":"https://api.github.com/users/thinkingmedia/repos","events_url":"https://api.github.com/users/thinkingmedia/events{/privacy}","received_events_url":"https://api.github.com/users/thinkingmedia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thinkingmedia/bootstrap-ui","description":"Transparently use Twitter Bootstrap 3 with CakePHP 3","fork":true,"url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui","forks_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/forks","keys_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/teams","hooks_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/hooks","issue_events_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/issues/events{/number}","events_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/events","assignees_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/assignees{/user}","branches_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/branches{/branch}","tags_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/tags","blobs_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/languages","stargazers_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/stargazers","contributors_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/contributors","subscribers_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/subscribers","subscription_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/subscription","commits_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/contents/{+path}","compare_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/merges","archive_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/downloads","issues_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/issues{/number}","pulls_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/labels{/name}","releases_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/releases{/id}","deployments_url":"https://api.github.com/repos/thinkingmedia/bootstrap-ui/deployments","created_at":"2016-03-28T02:57:16Z","updated_at":"2016-03-28T02:57:17Z","pushed_at":"2016-03-29T17:52:22Z","git_url":"git://github.com/thinkingmedia/bootstrap-ui.git","ssh_url":"git@github.com:thinkingmedia/bootstrap-ui.git","clone_url":"https://github.com/thinkingmedia/bootstrap-ui.git","svn_url":"https://github.com/thinkingmedia/bootstrap-ui","homepage":"","size":337,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"FriendsOfCake:master","ref":"master","sha":"8aeb721e3ec1ff480eff1ece0685376f2d967d63","user":{"login":"FriendsOfCake","id":5203126,"avatar_url":"https://avatars.githubusercontent.com/u/5203126?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfCake","html_url":"https://github.com/FriendsOfCake","followers_url":"https://api.github.com/users/FriendsOfCake/followers","following_url":"https://api.github.com/users/FriendsOfCake/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfCake/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfCake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfCake/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfCake/orgs","repos_url":"https://api.github.com/users/FriendsOfCake/repos","events_url":"https://api.github.com/users/FriendsOfCake/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfCake/received_events","type":"Organization","site_admin":false},"repo":{"id":28697596,"name":"bootstrap-ui","full_name":"FriendsOfCake/bootstrap-ui","owner":{"login":"FriendsOfCake","id":5203126,"avatar_url":"https://avatars.githubusercontent.com/u/5203126?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfCake","html_url":"https://github.com/FriendsOfCake","followers_url":"https://api.github.com/users/FriendsOfCake/followers","following_url":"https://api.github.com/users/FriendsOfCake/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfCake/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfCake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfCake/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfCake/orgs","repos_url":"https://api.github.com/users/FriendsOfCake/repos","events_url":"https://api.github.com/users/FriendsOfCake/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfCake/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FriendsOfCake/bootstrap-ui","description":"Transparently use Bootstrap 3 with CakePHP 3","fork":false,"url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui","forks_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/forks","keys_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/teams","hooks_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/hooks","issue_events_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/issues/events{/number}","events_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/events","assignees_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/assignees{/user}","branches_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/branches{/branch}","tags_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/tags","blobs_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/languages","stargazers_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/stargazers","contributors_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/contributors","subscribers_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/subscribers","subscription_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/subscription","commits_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/contents/{+path}","compare_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/merges","archive_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/downloads","issues_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/issues{/number}","pulls_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/labels{/name}","releases_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/releases{/id}","deployments_url":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/deployments","created_at":"2015-01-01T22:44:43Z","updated_at":"2016-03-28T16:45:29Z","pushed_at":"2016-03-29T17:52:23Z","git_url":"git://github.com/FriendsOfCake/bootstrap-ui.git","ssh_url":"git@github.com:FriendsOfCake/bootstrap-ui.git","clone_url":"https://github.com/FriendsOfCake/bootstrap-ui.git","svn_url":"https://github.com/FriendsOfCake/bootstrap-ui","homepage":"","size":466,"stargazers_count":152,"watchers_count":152,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":8,"forks":50,"open_issues":8,"watchers":152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/147"},"html":{"href":"https://github.com/FriendsOfCake/bootstrap-ui/pull/147"},"issue":{"href":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/issues/147"},"comments":{"href":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/FriendsOfCake/bootstrap-ui/statuses/d642032296d95d1999a8102cd3f2b9370626d8c9"}}}}