{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/8631","repository_url":"https://api.github.com/repos/cakephp/cakephp","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/8631/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/8631/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/8631/events","html_url":"https://github.com/cakephp/cakephp/issues/8631","id":147713645,"number":8631,"title":"__call() for HtmlHelper","user":{"login":"mirko-pagliai","id":293199,"avatar_url":"https://avatars.githubusercontent.com/u/293199?v=3","gravatar_id":"","url":"https://api.github.com/users/mirko-pagliai","html_url":"https://github.com/mirko-pagliai","followers_url":"https://api.github.com/users/mirko-pagliai/followers","following_url":"https://api.github.com/users/mirko-pagliai/following{/other_user}","gists_url":"https://api.github.com/users/mirko-pagliai/gists{/gist_id}","starred_url":"https://api.github.com/users/mirko-pagliai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirko-pagliai/subscriptions","organizations_url":"https://api.github.com/users/mirko-pagliai/orgs","repos_url":"https://api.github.com/users/mirko-pagliai/repos","events_url":"https://api.github.com/users/mirko-pagliai/events{/privacy}","received_events_url":"https://api.github.com/users/mirko-pagliai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Enhancement","name":"Enhancement","color":"bfe5bf"},{"url":"https://api.github.com/repos/cakephp/cakephp/labels/helpers","name":"helpers","color":"ffffff"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/69","html_url":"https://github.com/cakephp/cakephp/milestones/3.3.0","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/69/labels","id":1443324,"number":69,"title":"3.3.0","description":"A backwards compatible feature release for 3.x. See the [3.3 Roadmap](https://github.com/cakephp/cakephp/wiki/3.3-Roadmap)","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":73,"closed_issues":44,"state":"open","created_at":"2015-12-04T02:24:56Z","updated_at":"2016-04-12T16:41:31Z","due_on":"2016-06-12T04:00:00Z","closed_at":null},"comments":13,"created_at":"2016-04-12T11:12:08Z","updated_at":"2016-04-12T17:42:00Z","closed_at":null,"body":"I was thinking: why not add a `__call()` method for `HtmlHelper`?\r\n\r\nSomething like this:\r\n\r\n\r\n\tpublic function __call($method, $params) {\r\n\t\tif(count($params) <= 2) {\r\n\t\t\treturn self::tag($method, $params[0], empty($params[1]) ? [] : $params[1]);\r\n        }\r\n\t\t\r\n\t\tparent::__call($method, $params);\r\n\t}"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/209023573","html_url":"https://github.com/cakephp/cakephp/issues/8631#issuecomment-209023573","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/8631","id":209023573,"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},"created_at":"2016-04-12T17:41:59Z","updated_at":"2016-04-12T17:41:59Z","body":"Passing an array of these new objects would wrap those objects.\r\n\r\n```\r\n   $a1 = $this->Tag->a($url)->span('Menu 1');\r\n   $a2 = $this->Tag->a($url)->span('Menu 2');\r\n   $a3 = $this->Tag->a($url)->span('Menu 3');\r\n\r\n   echo $this->Tag->ul()->li([$a1, $a2, $a3]);\r\n\r\n   // outputs\r\n   <ul>\r\n     <li><a href=\"#\"><span>Menu 1</span></a></li>\r\n     <li><a href=\"#\"><span>Menu 2</span></a></li>\r\n     <li><a href=\"#\"><span>Menu 3</span></a></li>\r\n   </ul>\r\n\r\n```"}}