{"action":"created","comment":{"url":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/comments/23456976","id":23456976,"diff_hunk":"@@ -81,6 +86,99 @@ public function get($menu, array $path = array(), array $options = array())\n      */\n     public function render($menu, array $options = array(), $renderer =  null)\n     {\n+        $menu = $this->castMenu($menu);\n+\n+        return $this->rendererProvider->get($renderer)->render($menu, $options);\n+    }\n+\n+    /**\n+     * A string representation of this menu item\n+     *\n+     * e.g. Top Level > Second Level > This menu\n+     *\n+     * @param ItemInterface $item\n+     * @param string        $separator\n+     *\n+     * @return string\n+     */\n+    public function pathAsString(ItemInterface $menu, $separator = ' > ')\n+    {\n+        if (null === $this->menuManipulator) {\n+            throw new \\BadMethodCallException('The menu manipulator must be set to transform a path to a string');\n+        }\n+\n+        return $this->menuManipulator->getPathAsString($menu, $separator);\n+    }\n+\n+    /**\n+     * Renders an array ready to be used for breadcrumbs.\n+     *\n+     * Each element in the array will be an array with 3 keys:\n+     * - `label` containing the label of the item\n+     * - `url` containing the url of the item (may be `null`)\n+     * - `item` containing the original item (may be `null` for the extra items)\n+     *\n+     * The subItem can be one of the following forms\n+     *   * 'subItem'\n+     *   * ItemInterface object\n+     *   * array('subItem' => '@homepage')\n+     *   * array('subItem1', 'subItem2')\n+     *   * array(array('label' => 'subItem1', 'url' => '@homepage'), array('label' => 'subItem2'))\n+     *\n+     * @param mixed $item\n+     * @param mixed $subItem A string or array to append onto the end of the array\n+     *\n+     * @return array\n+     */\n+    public function getBreadcrumbsArray($menu, $subItem = null)\n+    {\n+        if (null === $this->menuManipulator) {\n+            throw new \\BadMethodCallException('The menu manipulator must be set to get the breadcrumbs array');\n+        }\n+\n+        $menu = $this->castMenu($menu);\n+\n+        return $this->menuManipulator->getBreadcrumbsArray($menu, $subItem);\n+    }\n+\n+    /**\n+     * Checks whether an item is current.\n+     *\n+     * @param ItemInterface $item\n+     *\n+     * @return boolean\n+     */\n+    public function isCurrent(ItemInterface $item)\n+    {\n+        if (null === $this->matcher) {\n+            throw new \\BadMethodCallException('The matcher must be set to check if item is current');\n+        }\n+\n+        return $this->matcher->isCurrent($item);\n+    }\n+\n+    /**\n+     * Checks whether an item is the ancestor of a current item.\n+     *\n+     * @param ItemInterface $item\n+     * @param integer       $depth The max depth to look for the item\n+     *\n+     * @return boolean\n+     */\n+    public function isAncestor(ItemInterface $item, $depth = null)\n+    {\n+        if (null === $this->matcher) {\n+            throw new \\BadMethodCallException('The matcher must be set to check if item is ancestor');\n+        }\n+\n+        return $this->matcher->isAncestor($item);\n+    }\n+\n+    /**\n+     * @return ItemInterface","path":"src/Knp/Menu/Twig/Helper.php","position":122,"original_position":122,"commit_id":"d61dbf15b5ab8369f184a8fd715cbce023849d1f","original_commit_id":"d61dbf15b5ab8369f184a8fd715cbce023849d1f","user":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"body":"missing ``@param``","created_at":"2015-01-23T15:40:13Z","updated_at":"2015-01-23T15:40:13Z","html_url":"https://github.com/KnpLabs/KnpMenu/pull/189#discussion_r23456976","pull_request_url":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/189","_links":{"self":{"href":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/comments/23456976"},"html":{"href":"https://github.com/KnpLabs/KnpMenu/pull/189#discussion_r23456976"},"pull_request":{"href":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/189"}}},"pull_request":{"url":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/189","id":26836820,"html_url":"https://github.com/KnpLabs/KnpMenu/pull/189","diff_url":"https://github.com/KnpLabs/KnpMenu/pull/189.diff","patch_url":"https://github.com/KnpLabs/KnpMenu/pull/189.patch","issue_url":"https://api.github.com/repos/KnpLabs/KnpMenu/issues/189","number":189,"state":"open","locked":false,"title":"Integrated more functions into Twig","user":{"login":"WouterJ","id":749025,"avatar_url":"https://avatars.githubusercontent.com/u/749025?v=3","gravatar_id":"","url":"https://api.github.com/users/WouterJ","html_url":"https://github.com/WouterJ","followers_url":"https://api.github.com/users/WouterJ/followers","following_url":"https://api.github.com/users/WouterJ/following{/other_user}","gists_url":"https://api.github.com/users/WouterJ/gists{/gist_id}","starred_url":"https://api.github.com/users/WouterJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WouterJ/subscriptions","organizations_url":"https://api.github.com/users/WouterJ/orgs","repos_url":"https://api.github.com/users/WouterJ/repos","events_url":"https://api.github.com/users/WouterJ/events{/privacy}","received_events_url":"https://api.github.com/users/WouterJ/received_events","type":"User","site_admin":false},"body":"Now some functions are moved from `ItemInterface` to utils and other classes, there is no way they can be used inside a template.\r\n\r\nThis PR adds back some functionality.\r\n\r\nAs we need this to finish our KnpMenu 2.0 update for the Symfony CMF project, can this please be reviewed and merged quickly and be included in a new minor version?","created_at":"2015-01-05T17:13:31Z","updated_at":"2015-01-23T15:40:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b41a2592b4ba3db9d216f58041246494660b859","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/189/commits","review_comments_url":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/189/comments","review_comment_url":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/comments/{number}","comments_url":"https://api.github.com/repos/KnpLabs/KnpMenu/issues/189/comments","statuses_url":"https://api.github.com/repos/KnpLabs/KnpMenu/statuses/d61dbf15b5ab8369f184a8fd715cbce023849d1f","head":{"label":"WouterJ:better_twig_integration","ref":"better_twig_integration","sha":"d61dbf15b5ab8369f184a8fd715cbce023849d1f","user":{"login":"WouterJ","id":749025,"avatar_url":"https://avatars.githubusercontent.com/u/749025?v=3","gravatar_id":"","url":"https://api.github.com/users/WouterJ","html_url":"https://github.com/WouterJ","followers_url":"https://api.github.com/users/WouterJ/followers","following_url":"https://api.github.com/users/WouterJ/following{/other_user}","gists_url":"https://api.github.com/users/WouterJ/gists{/gist_id}","starred_url":"https://api.github.com/users/WouterJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WouterJ/subscriptions","organizations_url":"https://api.github.com/users/WouterJ/orgs","repos_url":"https://api.github.com/users/WouterJ/repos","events_url":"https://api.github.com/users/WouterJ/events{/privacy}","received_events_url":"https://api.github.com/users/WouterJ/received_events","type":"User","site_admin":false},"repo":{"id":25978837,"name":"KnpMenu","full_name":"WouterJ/KnpMenu","owner":{"login":"WouterJ","id":749025,"avatar_url":"https://avatars.githubusercontent.com/u/749025?v=3","gravatar_id":"","url":"https://api.github.com/users/WouterJ","html_url":"https://github.com/WouterJ","followers_url":"https://api.github.com/users/WouterJ/followers","following_url":"https://api.github.com/users/WouterJ/following{/other_user}","gists_url":"https://api.github.com/users/WouterJ/gists{/gist_id}","starred_url":"https://api.github.com/users/WouterJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WouterJ/subscriptions","organizations_url":"https://api.github.com/users/WouterJ/orgs","repos_url":"https://api.github.com/users/WouterJ/repos","events_url":"https://api.github.com/users/WouterJ/events{/privacy}","received_events_url":"https://api.github.com/users/WouterJ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WouterJ/KnpMenu","description":"Menu Library for PHP5","fork":true,"url":"https://api.github.com/repos/WouterJ/KnpMenu","forks_url":"https://api.github.com/repos/WouterJ/KnpMenu/forks","keys_url":"https://api.github.com/repos/WouterJ/KnpMenu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WouterJ/KnpMenu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WouterJ/KnpMenu/teams","hooks_url":"https://api.github.com/repos/WouterJ/KnpMenu/hooks","issue_events_url":"https://api.github.com/repos/WouterJ/KnpMenu/issues/events{/number}","events_url":"https://api.github.com/repos/WouterJ/KnpMenu/events","assignees_url":"https://api.github.com/repos/WouterJ/KnpMenu/assignees{/user}","branches_url":"https://api.github.com/repos/WouterJ/KnpMenu/branches{/branch}","tags_url":"https://api.github.com/repos/WouterJ/KnpMenu/tags","blobs_url":"https://api.github.com/repos/WouterJ/KnpMenu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WouterJ/KnpMenu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WouterJ/KnpMenu/git/refs{/sha}","trees_url":"https://api.github.com/repos/WouterJ/KnpMenu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WouterJ/KnpMenu/statuses/{sha}","languages_url":"https://api.github.com/repos/WouterJ/KnpMenu/languages","stargazers_url":"https://api.github.com/repos/WouterJ/KnpMenu/stargazers","contributors_url":"https://api.github.com/repos/WouterJ/KnpMenu/contributors","subscribers_url":"https://api.github.com/repos/WouterJ/KnpMenu/subscribers","subscription_url":"https://api.github.com/repos/WouterJ/KnpMenu/subscription","commits_url":"https://api.github.com/repos/WouterJ/KnpMenu/commits{/sha}","git_commits_url":"https://api.github.com/repos/WouterJ/KnpMenu/git/commits{/sha}","comments_url":"https://api.github.com/repos/WouterJ/KnpMenu/comments{/number}","issue_comment_url":"https://api.github.com/repos/WouterJ/KnpMenu/issues/comments/{number}","contents_url":"https://api.github.com/repos/WouterJ/KnpMenu/contents/{+path}","compare_url":"https://api.github.com/repos/WouterJ/KnpMenu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WouterJ/KnpMenu/merges","archive_url":"https://api.github.com/repos/WouterJ/KnpMenu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WouterJ/KnpMenu/downloads","issues_url":"https://api.github.com/repos/WouterJ/KnpMenu/issues{/number}","pulls_url":"https://api.github.com/repos/WouterJ/KnpMenu/pulls{/number}","milestones_url":"https://api.github.com/repos/WouterJ/KnpMenu/milestones{/number}","notifications_url":"https://api.github.com/repos/WouterJ/KnpMenu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WouterJ/KnpMenu/labels{/name}","releases_url":"https://api.github.com/repos/WouterJ/KnpMenu/releases{/id}","created_at":"2014-10-30T16:08:30Z","updated_at":"2014-10-29T19:34:03Z","pushed_at":"2015-01-05T21:03:30Z","git_url":"git://github.com/WouterJ/KnpMenu.git","ssh_url":"git@github.com:WouterJ/KnpMenu.git","clone_url":"https://github.com/WouterJ/KnpMenu.git","svn_url":"https://github.com/WouterJ/KnpMenu","homepage":"KnpLabs.com","size":549,"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":"master"}},"base":{"label":"KnpLabs:master","ref":"master","sha":"d6f3cc426c949d9a41925db2be5ffa0e5833f15a","user":{"login":"KnpLabs","id":202732,"avatar_url":"https://avatars.githubusercontent.com/u/202732?v=3","gravatar_id":"","url":"https://api.github.com/users/KnpLabs","html_url":"https://github.com/KnpLabs","followers_url":"https://api.github.com/users/KnpLabs/followers","following_url":"https://api.github.com/users/KnpLabs/following{/other_user}","gists_url":"https://api.github.com/users/KnpLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/KnpLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnpLabs/subscriptions","organizations_url":"https://api.github.com/users/KnpLabs/orgs","repos_url":"https://api.github.com/users/KnpLabs/repos","events_url":"https://api.github.com/users/KnpLabs/events{/privacy}","received_events_url":"https://api.github.com/users/KnpLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2174182,"name":"KnpMenu","full_name":"KnpLabs/KnpMenu","owner":{"login":"KnpLabs","id":202732,"avatar_url":"https://avatars.githubusercontent.com/u/202732?v=3","gravatar_id":"","url":"https://api.github.com/users/KnpLabs","html_url":"https://github.com/KnpLabs","followers_url":"https://api.github.com/users/KnpLabs/followers","following_url":"https://api.github.com/users/KnpLabs/following{/other_user}","gists_url":"https://api.github.com/users/KnpLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/KnpLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnpLabs/subscriptions","organizations_url":"https://api.github.com/users/KnpLabs/orgs","repos_url":"https://api.github.com/users/KnpLabs/repos","events_url":"https://api.github.com/users/KnpLabs/events{/privacy}","received_events_url":"https://api.github.com/users/KnpLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KnpLabs/KnpMenu","description":"Menu Library for PHP5","fork":false,"url":"https://api.github.com/repos/KnpLabs/KnpMenu","forks_url":"https://api.github.com/repos/KnpLabs/KnpMenu/forks","keys_url":"https://api.github.com/repos/KnpLabs/KnpMenu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KnpLabs/KnpMenu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KnpLabs/KnpMenu/teams","hooks_url":"https://api.github.com/repos/KnpLabs/KnpMenu/hooks","issue_events_url":"https://api.github.com/repos/KnpLabs/KnpMenu/issues/events{/number}","events_url":"https://api.github.com/repos/KnpLabs/KnpMenu/events","assignees_url":"https://api.github.com/repos/KnpLabs/KnpMenu/assignees{/user}","branches_url":"https://api.github.com/repos/KnpLabs/KnpMenu/branches{/branch}","tags_url":"https://api.github.com/repos/KnpLabs/KnpMenu/tags","blobs_url":"https://api.github.com/repos/KnpLabs/KnpMenu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KnpLabs/KnpMenu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KnpLabs/KnpMenu/git/refs{/sha}","trees_url":"https://api.github.com/repos/KnpLabs/KnpMenu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KnpLabs/KnpMenu/statuses/{sha}","languages_url":"https://api.github.com/repos/KnpLabs/KnpMenu/languages","stargazers_url":"https://api.github.com/repos/KnpLabs/KnpMenu/stargazers","contributors_url":"https://api.github.com/repos/KnpLabs/KnpMenu/contributors","subscribers_url":"https://api.github.com/repos/KnpLabs/KnpMenu/subscribers","subscription_url":"https://api.github.com/repos/KnpLabs/KnpMenu/subscription","commits_url":"https://api.github.com/repos/KnpLabs/KnpMenu/commits{/sha}","git_commits_url":"https://api.github.com/repos/KnpLabs/KnpMenu/git/commits{/sha}","comments_url":"https://api.github.com/repos/KnpLabs/KnpMenu/comments{/number}","issue_comment_url":"https://api.github.com/repos/KnpLabs/KnpMenu/issues/comments/{number}","contents_url":"https://api.github.com/repos/KnpLabs/KnpMenu/contents/{+path}","compare_url":"https://api.github.com/repos/KnpLabs/KnpMenu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KnpLabs/KnpMenu/merges","archive_url":"https://api.github.com/repos/KnpLabs/KnpMenu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KnpLabs/KnpMenu/downloads","issues_url":"https://api.github.com/repos/KnpLabs/KnpMenu/issues{/number}","pulls_url":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls{/number}","milestones_url":"https://api.github.com/repos/KnpLabs/KnpMenu/milestones{/number}","notifications_url":"https://api.github.com/repos/KnpLabs/KnpMenu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KnpLabs/KnpMenu/labels{/name}","releases_url":"https://api.github.com/repos/KnpLabs/KnpMenu/releases{/id}","created_at":"2011-08-08T15:39:40Z","updated_at":"2015-01-23T15:02:12Z","pushed_at":"2014-10-28T08:40:35Z","git_url":"git://github.com/KnpLabs/KnpMenu.git","ssh_url":"git@github.com:KnpLabs/KnpMenu.git","clone_url":"https://github.com/KnpLabs/KnpMenu.git","svn_url":"https://github.com/KnpLabs/KnpMenu","homepage":"KnpLabs.com","size":1695,"stargazers_count":295,"watchers_count":295,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"open_issues_count":23,"forks":120,"open_issues":23,"watchers":295,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/189"},"html":{"href":"https://github.com/KnpLabs/KnpMenu/pull/189"},"issue":{"href":"https://api.github.com/repos/KnpLabs/KnpMenu/issues/189"},"comments":{"href":"https://api.github.com/repos/KnpLabs/KnpMenu/issues/189/comments"},"review_comments":{"href":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/189/comments"},"review_comment":{"href":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/KnpLabs/KnpMenu/pulls/189/commits"},"statuses":{"href":"https://api.github.com/repos/KnpLabs/KnpMenu/statuses/d61dbf15b5ab8369f184a8fd715cbce023849d1f"}}}}