{"action":"created","comment":{"url":"https://api.github.com/repos/nette/application/pulls/comments/80475517","id":80475517,"diff_hunk":"@@ -48,7 +51,11 @@ public function __construct(ILatteFactory $latteFactory, Nette\\Http\\IRequest $ht\n \tpublic function createTemplate(UI\\Control $control = NULL)\n \t{\n \t\t$latte = $this->latteFactory->create();\n-\t\t$template = new Template($latte);\n+\t\t$template = new $this->templateClass($latte);\n+\t\tif (!$template instanceof UI\\ITemplate) {","path":"src/Bridges/ApplicationLatte/TemplateFactory.php","position":16,"original_position":16,"commit_id":"f93c54472d30552647fc13edb2cee9e0be72155f","original_commit_id":"f93c54472d30552647fc13edb2cee9e0be72155f","user":{"login":"JanTvrdik","id":175109,"avatar_url":"https://avatars.githubusercontent.com/u/175109?v=3","gravatar_id":"","url":"https://api.github.com/users/JanTvrdik","html_url":"https://github.com/JanTvrdik","followers_url":"https://api.github.com/users/JanTvrdik/followers","following_url":"https://api.github.com/users/JanTvrdik/following{/other_user}","gists_url":"https://api.github.com/users/JanTvrdik/gists{/gist_id}","starred_url":"https://api.github.com/users/JanTvrdik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanTvrdik/subscriptions","organizations_url":"https://api.github.com/users/JanTvrdik/orgs","repos_url":"https://api.github.com/users/JanTvrdik/repos","events_url":"https://api.github.com/users/JanTvrdik/events{/privacy}","received_events_url":"https://api.github.com/users/JanTvrdik/received_events","type":"User","site_admin":false},"body":"This check should be moved to `setTemplateClass` (see is_a with third argument set to TRUE)","created_at":"2016-09-26T13:35:46Z","updated_at":"2016-09-26T13:35:46Z","html_url":"https://github.com/nette/application/pull/159#discussion_r80475517","pull_request_url":"https://api.github.com/repos/nette/application/pulls/159","_links":{"self":{"href":"https://api.github.com/repos/nette/application/pulls/comments/80475517"},"html":{"href":"https://github.com/nette/application/pull/159#discussion_r80475517"},"pull_request":{"href":"https://api.github.com/repos/nette/application/pulls/159"}}},"pull_request":{"url":"https://api.github.com/repos/nette/application/pulls/159","id":86645679,"html_url":"https://github.com/nette/application/pull/159","diff_url":"https://github.com/nette/application/pull/159.diff","patch_url":"https://github.com/nette/application/pull/159.patch","issue_url":"https://api.github.com/repos/nette/application/issues/159","number":159,"state":"open","locked":false,"title":"WIP: TemplateFactory: add support for custom Template implementation","user":{"login":"mrtnzlml","id":978368,"avatar_url":"https://avatars.githubusercontent.com/u/978368?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtnzlml","html_url":"https://github.com/mrtnzlml","followers_url":"https://api.github.com/users/mrtnzlml/followers","following_url":"https://api.github.com/users/mrtnzlml/following{/other_user}","gists_url":"https://api.github.com/users/mrtnzlml/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtnzlml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtnzlml/subscriptions","organizations_url":"https://api.github.com/users/mrtnzlml/orgs","repos_url":"https://api.github.com/users/mrtnzlml/repos","events_url":"https://api.github.com/users/mrtnzlml/events{/privacy}","received_events_url":"https://api.github.com/users/mrtnzlml/received_events","type":"User","site_admin":false},"body":"With this change it's possible to simply use custom Template implementation. Before this commit Template object initialization was hard-coded into TemplateFactory (related issue: https://github.com/nette/application/issues/141). Usage example (`config.neon`):\r\n\r\n```\r\nlatte:\r\n\ttemplateClass: App\\CustomTemplateImplementation\r\n```\r\n\r\nCustom template implementation MUST implement Nette\\Application\\UI\\ITemplate interface.\r\n\r\n- feature\r\n- issues - #141\r\n- documentation - needed: (**not ready yet**)\r\n- BC break - no\r\n\r\nThis is more request for comments than real PR. Thank you.","created_at":"2016-09-25T10:11:31Z","updated_at":"2016-09-26T13:42:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e87aca0bb7a27cb6a41f3f0d4b2501706b73f58b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nette/application/pulls/159/commits","review_comments_url":"https://api.github.com/repos/nette/application/pulls/159/comments","review_comment_url":"https://api.github.com/repos/nette/application/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nette/application/issues/159/comments","statuses_url":"https://api.github.com/repos/nette/application/statuses/f93c54472d30552647fc13edb2cee9e0be72155f","head":{"label":"mrtnzlml:customTemplate2","ref":"customTemplate2","sha":"f93c54472d30552647fc13edb2cee9e0be72155f","user":{"login":"mrtnzlml","id":978368,"avatar_url":"https://avatars.githubusercontent.com/u/978368?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtnzlml","html_url":"https://github.com/mrtnzlml","followers_url":"https://api.github.com/users/mrtnzlml/followers","following_url":"https://api.github.com/users/mrtnzlml/following{/other_user}","gists_url":"https://api.github.com/users/mrtnzlml/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtnzlml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtnzlml/subscriptions","organizations_url":"https://api.github.com/users/mrtnzlml/orgs","repos_url":"https://api.github.com/users/mrtnzlml/repos","events_url":"https://api.github.com/users/mrtnzlml/events{/privacy}","received_events_url":"https://api.github.com/users/mrtnzlml/received_events","type":"User","site_admin":false},"repo":{"id":64639713,"name":"application","full_name":"mrtnzlml/application","owner":{"login":"mrtnzlml","id":978368,"avatar_url":"https://avatars.githubusercontent.com/u/978368?v=3","gravatar_id":"","url":"https://api.github.com/users/mrtnzlml","html_url":"https://github.com/mrtnzlml","followers_url":"https://api.github.com/users/mrtnzlml/followers","following_url":"https://api.github.com/users/mrtnzlml/following{/other_user}","gists_url":"https://api.github.com/users/mrtnzlml/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtnzlml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtnzlml/subscriptions","organizations_url":"https://api.github.com/users/mrtnzlml/orgs","repos_url":"https://api.github.com/users/mrtnzlml/repos","events_url":"https://api.github.com/users/mrtnzlml/events{/privacy}","received_events_url":"https://api.github.com/users/mrtnzlml/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrtnzlml/application","description":"The kernel of web application","fork":true,"url":"https://api.github.com/repos/mrtnzlml/application","forks_url":"https://api.github.com/repos/mrtnzlml/application/forks","keys_url":"https://api.github.com/repos/mrtnzlml/application/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrtnzlml/application/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrtnzlml/application/teams","hooks_url":"https://api.github.com/repos/mrtnzlml/application/hooks","issue_events_url":"https://api.github.com/repos/mrtnzlml/application/issues/events{/number}","events_url":"https://api.github.com/repos/mrtnzlml/application/events","assignees_url":"https://api.github.com/repos/mrtnzlml/application/assignees{/user}","branches_url":"https://api.github.com/repos/mrtnzlml/application/branches{/branch}","tags_url":"https://api.github.com/repos/mrtnzlml/application/tags","blobs_url":"https://api.github.com/repos/mrtnzlml/application/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrtnzlml/application/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrtnzlml/application/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrtnzlml/application/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrtnzlml/application/statuses/{sha}","languages_url":"https://api.github.com/repos/mrtnzlml/application/languages","stargazers_url":"https://api.github.com/repos/mrtnzlml/application/stargazers","contributors_url":"https://api.github.com/repos/mrtnzlml/application/contributors","subscribers_url":"https://api.github.com/repos/mrtnzlml/application/subscribers","subscription_url":"https://api.github.com/repos/mrtnzlml/application/subscription","commits_url":"https://api.github.com/repos/mrtnzlml/application/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrtnzlml/application/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrtnzlml/application/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrtnzlml/application/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrtnzlml/application/contents/{+path}","compare_url":"https://api.github.com/repos/mrtnzlml/application/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrtnzlml/application/merges","archive_url":"https://api.github.com/repos/mrtnzlml/application/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrtnzlml/application/downloads","issues_url":"https://api.github.com/repos/mrtnzlml/application/issues{/number}","pulls_url":"https://api.github.com/repos/mrtnzlml/application/pulls{/number}","milestones_url":"https://api.github.com/repos/mrtnzlml/application/milestones{/number}","notifications_url":"https://api.github.com/repos/mrtnzlml/application/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrtnzlml/application/labels{/name}","releases_url":"https://api.github.com/repos/mrtnzlml/application/releases{/id}","deployments_url":"https://api.github.com/repos/mrtnzlml/application/deployments","created_at":"2016-08-01T05:55:10Z","updated_at":"2016-08-01T05:55:12Z","pushed_at":"2016-09-26T13:29:16Z","git_url":"git://github.com/mrtnzlml/application.git","ssh_url":"git@github.com:mrtnzlml/application.git","clone_url":"https://github.com/mrtnzlml/application.git","svn_url":"https://github.com/mrtnzlml/application","homepage":"https://nette.org","size":1925,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"nette:master","ref":"master","sha":"21f129cfb2f2093b37b27bddabde5a99ff2e34b4","user":{"login":"nette","id":99965,"avatar_url":"https://avatars.githubusercontent.com/u/99965?v=3","gravatar_id":"","url":"https://api.github.com/users/nette","html_url":"https://github.com/nette","followers_url":"https://api.github.com/users/nette/followers","following_url":"https://api.github.com/users/nette/following{/other_user}","gists_url":"https://api.github.com/users/nette/gists{/gist_id}","starred_url":"https://api.github.com/users/nette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nette/subscriptions","organizations_url":"https://api.github.com/users/nette/orgs","repos_url":"https://api.github.com/users/nette/repos","events_url":"https://api.github.com/users/nette/events{/privacy}","received_events_url":"https://api.github.com/users/nette/received_events","type":"Organization","site_admin":false},"repo":{"id":17694329,"name":"application","full_name":"nette/application","owner":{"login":"nette","id":99965,"avatar_url":"https://avatars.githubusercontent.com/u/99965?v=3","gravatar_id":"","url":"https://api.github.com/users/nette","html_url":"https://github.com/nette","followers_url":"https://api.github.com/users/nette/followers","following_url":"https://api.github.com/users/nette/following{/other_user}","gists_url":"https://api.github.com/users/nette/gists{/gist_id}","starred_url":"https://api.github.com/users/nette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nette/subscriptions","organizations_url":"https://api.github.com/users/nette/orgs","repos_url":"https://api.github.com/users/nette/repos","events_url":"https://api.github.com/users/nette/events{/privacy}","received_events_url":"https://api.github.com/users/nette/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nette/application","description":"The kernel of web application","fork":false,"url":"https://api.github.com/repos/nette/application","forks_url":"https://api.github.com/repos/nette/application/forks","keys_url":"https://api.github.com/repos/nette/application/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nette/application/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nette/application/teams","hooks_url":"https://api.github.com/repos/nette/application/hooks","issue_events_url":"https://api.github.com/repos/nette/application/issues/events{/number}","events_url":"https://api.github.com/repos/nette/application/events","assignees_url":"https://api.github.com/repos/nette/application/assignees{/user}","branches_url":"https://api.github.com/repos/nette/application/branches{/branch}","tags_url":"https://api.github.com/repos/nette/application/tags","blobs_url":"https://api.github.com/repos/nette/application/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nette/application/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nette/application/git/refs{/sha}","trees_url":"https://api.github.com/repos/nette/application/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nette/application/statuses/{sha}","languages_url":"https://api.github.com/repos/nette/application/languages","stargazers_url":"https://api.github.com/repos/nette/application/stargazers","contributors_url":"https://api.github.com/repos/nette/application/contributors","subscribers_url":"https://api.github.com/repos/nette/application/subscribers","subscription_url":"https://api.github.com/repos/nette/application/subscription","commits_url":"https://api.github.com/repos/nette/application/commits{/sha}","git_commits_url":"https://api.github.com/repos/nette/application/git/commits{/sha}","comments_url":"https://api.github.com/repos/nette/application/comments{/number}","issue_comment_url":"https://api.github.com/repos/nette/application/issues/comments{/number}","contents_url":"https://api.github.com/repos/nette/application/contents/{+path}","compare_url":"https://api.github.com/repos/nette/application/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nette/application/merges","archive_url":"https://api.github.com/repos/nette/application/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nette/application/downloads","issues_url":"https://api.github.com/repos/nette/application/issues{/number}","pulls_url":"https://api.github.com/repos/nette/application/pulls{/number}","milestones_url":"https://api.github.com/repos/nette/application/milestones{/number}","notifications_url":"https://api.github.com/repos/nette/application/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nette/application/labels{/name}","releases_url":"https://api.github.com/repos/nette/application/releases{/id}","deployments_url":"https://api.github.com/repos/nette/application/deployments","created_at":"2014-03-13T03:54:10Z","updated_at":"2016-07-21T12:36:12Z","pushed_at":"2016-09-26T13:29:16Z","git_url":"git://github.com/nette/application.git","ssh_url":"git@github.com:nette/application.git","clone_url":"https://github.com/nette/application.git","svn_url":"https://github.com/nette/application","homepage":"https://nette.org","size":2126,"stargazers_count":75,"watchers_count":75,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":19,"forks":56,"open_issues":19,"watchers":75,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nette/application/pulls/159"},"html":{"href":"https://github.com/nette/application/pull/159"},"issue":{"href":"https://api.github.com/repos/nette/application/issues/159"},"comments":{"href":"https://api.github.com/repos/nette/application/issues/159/comments"},"review_comments":{"href":"https://api.github.com/repos/nette/application/pulls/159/comments"},"review_comment":{"href":"https://api.github.com/repos/nette/application/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nette/application/pulls/159/commits"},"statuses":{"href":"https://api.github.com/repos/nette/application/statuses/f93c54472d30552647fc13edb2cee9e0be72155f"}}}}
{"actor":{"display_login":"JanTvrdik"}}