{"action":"opened","issue":{"url":"https://api.github.com/repos/cryophallion/C5Tutorial-ProgrammaticPageTypes/issues/2","repository_url":"https://api.github.com/repos/cryophallion/C5Tutorial-ProgrammaticPageTypes","labels_url":"https://api.github.com/repos/cryophallion/C5Tutorial-ProgrammaticPageTypes/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/cryophallion/C5Tutorial-ProgrammaticPageTypes/issues/2/comments","events_url":"https://api.github.com/repos/cryophallion/C5Tutorial-ProgrammaticPageTypes/issues/2/events","html_url":"https://github.com/cryophallion/C5Tutorial-ProgrammaticPageTypes/issues/2","id":152014418,"number":2,"title":"addTemplate","user":{"login":"maschenborn","id":2129985,"avatar_url":"https://avatars.githubusercontent.com/u/2129985?v=3","gravatar_id":"","url":"https://api.github.com/users/maschenborn","html_url":"https://github.com/maschenborn","followers_url":"https://api.github.com/users/maschenborn/followers","following_url":"https://api.github.com/users/maschenborn/following{/other_user}","gists_url":"https://api.github.com/users/maschenborn/gists{/gist_id}","starred_url":"https://api.github.com/users/maschenborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maschenborn/subscriptions","organizations_url":"https://api.github.com/users/maschenborn/orgs","repos_url":"https://api.github.com/users/maschenborn/repos","events_url":"https://api.github.com/users/maschenborn/events{/privacy}","received_events_url":"https://api.github.com/users/maschenborn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-30T06:55:51Z","updated_at":"2016-04-30T06:55:51Z","closed_at":null,"body":"I tried to write an addTemplate-Function in your way.\r\nBut I'm not so experienced in documenting.\r\nSo I don't know how to describe the icon-parameter.\r\nBut it works...\r\n\r\n`\r\n    /**\r\n     * Add a Specific Template\r\n     * @param string $handle Template Handle\r\n     * @param string $name Template Name\r\n     * @param ??? $icon Template Icon\r\n     * @param object $pkg Package Object\r\n     * @param boolean $internal Template Is Internal\r\n     * @return object Template Object\r\n     */\r\n    protected function addTemplate($handle, $name, $pkg, $icon = FILENAME_PAGE_TEMPLATE_DEFAULT_ICON, $internal = false)\r\n    {\r\n        //Get Template if it's already created\r\n        $template = Template::getByHandle($handle);\r\n        if (!is_object($template)) {\r\n            //Create Template\r\n            $template = Template::add($handle, $name, $icon, $pkg, $internal);\r\n        }\r\n\r\n        return $template;\r\n    }\r\n`\r\n"}}