{"action":"created","comment":{"url":"https://api.github.com/repos/zikula/core/pulls/comments/38862869","id":38862869,"diff_hunk":"@@ -0,0 +1,84 @@\n+<?php\n+/**\n+ * Copyright Zikula Foundation 2015 - Zikula Application Framework\n+ *\n+ * This work is contributed to the Zikula Foundation under one or more\n+ * Contributor Agreements and licensed to You under the following license:\n+ *\n+ * @license GNU/LGPLv3 (or at your option, any later version).\n+ *\n+ * Please see the NOTICE file distributed with this source code for further\n+ * information regarding copyright and licensing.\n+ */\n+\n+namespace Zikula\\ThemeModule\\Controller;\n+\n+use Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route; // used in annotations - do not remove\n+use Symfony\\Component\\Yaml\\Yaml;\n+use Symfony\\Component\\HttpFoundation\\Request;\n+use Zikula\\Core\\Controller\\AbstractController;\n+use Zikula\\Core\\Theme\\Annotation\\Theme; // used in annotations - do not remove\n+\n+class VarController extends AbstractController\n+{\n+    /**\n+     * Configure a theme's variables based on provided .yml definitions for each field.\n+     * @Route(\"/admin/var/{themeName}\")\n+     * @todo change route name to /admin/variable/{themeName} when similar named is removed?\n+     * @Theme(\"admin\")\n+     *\n+     * @param Request $request\n+     * @param string $themeName\n+     * @return mixed\n+     * @throws \\InvalidArgumentException if theme type is not twig-based\n+     */\n+    public function varAction(Request $request, $themeName)\n+    {\n+        $themeBundle = \\ThemeUtil::getTheme($themeName);\n+        if (!$themeBundle->isTwigBased()) {\n+            throw new \\InvalidArgumentException('Theme type must be twig-based in ' . __FILE__ . ' at line ' . __LINE__ . '.');","path":"src/system/ThemeModule/Controller/VarController.php","position":39,"original_position":39,"commit_id":"45f58afc144f162573c5158344534f6eb7b86d11","original_commit_id":"45f58afc144f162573c5158344534f6eb7b86d11","user":{"login":"craigh","id":350048,"avatar_url":"https://avatars.githubusercontent.com/u/350048?v=3","gravatar_id":"","url":"https://api.github.com/users/craigh","html_url":"https://github.com/craigh","followers_url":"https://api.github.com/users/craigh/followers","following_url":"https://api.github.com/users/craigh/following{/other_user}","gists_url":"https://api.github.com/users/craigh/gists{/gist_id}","starred_url":"https://api.github.com/users/craigh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigh/subscriptions","organizations_url":"https://api.github.com/users/craigh/orgs","repos_url":"https://api.github.com/users/craigh/repos","events_url":"https://api.github.com/users/craigh/events{/privacy}","received_events_url":"https://api.github.com/users/craigh/received_events","type":"User","site_admin":false},"body":"it's an argument.","created_at":"2015-09-07T13:42:44Z","updated_at":"2015-09-07T13:42:44Z","html_url":"https://github.com/zikula/core/pull/2580#discussion_r38862869","pull_request_url":"https://api.github.com/repos/zikula/core/pulls/2580","_links":{"self":{"href":"https://api.github.com/repos/zikula/core/pulls/comments/38862869"},"html":{"href":"https://github.com/zikula/core/pull/2580#discussion_r38862869"},"pull_request":{"href":"https://api.github.com/repos/zikula/core/pulls/2580"}}},"pull_request":{"url":"https://api.github.com/repos/zikula/core/pulls/2580","id":44355499,"html_url":"https://github.com/zikula/core/pull/2580","diff_url":"https://github.com/zikula/core/pull/2580.diff","patch_url":"https://github.com/zikula/core/pull/2580.patch","issue_url":"https://api.github.com/repos/zikula/core/issues/2580","number":2580,"state":"open","locked":false,"title":"add method to configure twig-based theme variables (form-abstraction)","user":{"login":"craigh","id":350048,"avatar_url":"https://avatars.githubusercontent.com/u/350048?v=3","gravatar_id":"","url":"https://api.github.com/users/craigh","html_url":"https://github.com/craigh","followers_url":"https://api.github.com/users/craigh/followers","following_url":"https://api.github.com/users/craigh/following{/other_user}","gists_url":"https://api.github.com/users/craigh/gists{/gist_id}","starred_url":"https://api.github.com/users/craigh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigh/subscriptions","organizations_url":"https://api.github.com/users/craigh/orgs","repos_url":"https://api.github.com/users/craigh/repos","events_url":"https://api.github.com/users/craigh/events{/privacy}","received_events_url":"https://api.github.com/users/craigh/received_events","type":"User","site_admin":false},"body":"| Q                 | A\r\n| ----------------- | ---\r\n| Bug fix?          | no\r\n| New feature?      | yes\r\n| BC breaks?        | no\r\n| Deprecations?     | no\r\n| Tests pass?       | yes\r\n| Fixed tickets     | -\r\n| Refs tickets      | -\r\n| License           | MIT\r\n| Doc PR            | -\r\n| Changelog updated | [yes/no]","created_at":"2015-09-07T13:30:31Z","updated_at":"2015-09-07T13:42:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e8b1c3b311420db1c8824b6be93cc528d9eed26","assignee":null,"milestone":{"url":"https://api.github.com/repos/zikula/core/milestones/16","html_url":"https://github.com/zikula/core/milestones/1.4.1","labels_url":"https://api.github.com/repos/zikula/core/milestones/16/labels","id":959389,"number":16,"title":"1.4.1","description":"First service release for the 1.4.x series.","creator":{"login":"Guite","id":277531,"avatar_url":"https://avatars.githubusercontent.com/u/277531?v=3","gravatar_id":"","url":"https://api.github.com/users/Guite","html_url":"https://github.com/Guite","followers_url":"https://api.github.com/users/Guite/followers","following_url":"https://api.github.com/users/Guite/following{/other_user}","gists_url":"https://api.github.com/users/Guite/gists{/gist_id}","starred_url":"https://api.github.com/users/Guite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Guite/subscriptions","organizations_url":"https://api.github.com/users/Guite/orgs","repos_url":"https://api.github.com/users/Guite/repos","events_url":"https://api.github.com/users/Guite/events{/privacy}","received_events_url":"https://api.github.com/users/Guite/received_events","type":"User","site_admin":false},"open_issues":52,"closed_issues":19,"state":"open","created_at":"2015-01-31T11:18:03Z","updated_at":"2015-09-07T13:30:31Z","due_on":"2015-11-20T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/zikula/core/pulls/2580/commits","review_comments_url":"https://api.github.com/repos/zikula/core/pulls/2580/comments","review_comment_url":"https://api.github.com/repos/zikula/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zikula/core/issues/2580/comments","statuses_url":"https://api.github.com/repos/zikula/core/statuses/45f58afc144f162573c5158344534f6eb7b86d11","head":{"label":"zikula:theme-config-vars","ref":"theme-config-vars","sha":"45f58afc144f162573c5158344534f6eb7b86d11","user":{"login":"zikula","id":251211,"avatar_url":"https://avatars.githubusercontent.com/u/251211?v=3","gravatar_id":"","url":"https://api.github.com/users/zikula","html_url":"https://github.com/zikula","followers_url":"https://api.github.com/users/zikula/followers","following_url":"https://api.github.com/users/zikula/following{/other_user}","gists_url":"https://api.github.com/users/zikula/gists{/gist_id}","starred_url":"https://api.github.com/users/zikula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zikula/subscriptions","organizations_url":"https://api.github.com/users/zikula/orgs","repos_url":"https://api.github.com/users/zikula/repos","events_url":"https://api.github.com/users/zikula/events{/privacy}","received_events_url":"https://api.github.com/users/zikula/received_events","type":"Organization","site_admin":false},"repo":{"id":781544,"name":"core","full_name":"zikula/core","owner":{"login":"zikula","id":251211,"avatar_url":"https://avatars.githubusercontent.com/u/251211?v=3","gravatar_id":"","url":"https://api.github.com/users/zikula","html_url":"https://github.com/zikula","followers_url":"https://api.github.com/users/zikula/followers","following_url":"https://api.github.com/users/zikula/following{/other_user}","gists_url":"https://api.github.com/users/zikula/gists{/gist_id}","starred_url":"https://api.github.com/users/zikula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zikula/subscriptions","organizations_url":"https://api.github.com/users/zikula/orgs","repos_url":"https://api.github.com/users/zikula/repos","events_url":"https://api.github.com/users/zikula/events{/privacy}","received_events_url":"https://api.github.com/users/zikula/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zikula/core","description":"Zikula Core Framework","fork":false,"url":"https://api.github.com/repos/zikula/core","forks_url":"https://api.github.com/repos/zikula/core/forks","keys_url":"https://api.github.com/repos/zikula/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zikula/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zikula/core/teams","hooks_url":"https://api.github.com/repos/zikula/core/hooks","issue_events_url":"https://api.github.com/repos/zikula/core/issues/events{/number}","events_url":"https://api.github.com/repos/zikula/core/events","assignees_url":"https://api.github.com/repos/zikula/core/assignees{/user}","branches_url":"https://api.github.com/repos/zikula/core/branches{/branch}","tags_url":"https://api.github.com/repos/zikula/core/tags","blobs_url":"https://api.github.com/repos/zikula/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zikula/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zikula/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/zikula/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zikula/core/statuses/{sha}","languages_url":"https://api.github.com/repos/zikula/core/languages","stargazers_url":"https://api.github.com/repos/zikula/core/stargazers","contributors_url":"https://api.github.com/repos/zikula/core/contributors","subscribers_url":"https://api.github.com/repos/zikula/core/subscribers","subscription_url":"https://api.github.com/repos/zikula/core/subscription","commits_url":"https://api.github.com/repos/zikula/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/zikula/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/zikula/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/zikula/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/zikula/core/contents/{+path}","compare_url":"https://api.github.com/repos/zikula/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zikula/core/merges","archive_url":"https://api.github.com/repos/zikula/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zikula/core/downloads","issues_url":"https://api.github.com/repos/zikula/core/issues{/number}","pulls_url":"https://api.github.com/repos/zikula/core/pulls{/number}","milestones_url":"https://api.github.com/repos/zikula/core/milestones{/number}","notifications_url":"https://api.github.com/repos/zikula/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zikula/core/labels{/name}","releases_url":"https://api.github.com/repos/zikula/core/releases{/id}","created_at":"2010-07-18T10:35:53Z","updated_at":"2015-08-23T03:41:15Z","pushed_at":"2015-09-07T13:30:31Z","git_url":"git://github.com/zikula/core.git","ssh_url":"git@github.com:zikula/core.git","clone_url":"https://github.com/zikula/core.git","svn_url":"https://github.com/zikula/core","homepage":"http://zikula.org/","size":66882,"stargazers_count":164,"watchers_count":164,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"open_issues_count":158,"forks":76,"open_issues":158,"watchers":164,"default_branch":"1.4"}},"base":{"label":"zikula:1.4","ref":"1.4","sha":"049d0671189f298aa6b9c628306486ded0bf394b","user":{"login":"zikula","id":251211,"avatar_url":"https://avatars.githubusercontent.com/u/251211?v=3","gravatar_id":"","url":"https://api.github.com/users/zikula","html_url":"https://github.com/zikula","followers_url":"https://api.github.com/users/zikula/followers","following_url":"https://api.github.com/users/zikula/following{/other_user}","gists_url":"https://api.github.com/users/zikula/gists{/gist_id}","starred_url":"https://api.github.com/users/zikula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zikula/subscriptions","organizations_url":"https://api.github.com/users/zikula/orgs","repos_url":"https://api.github.com/users/zikula/repos","events_url":"https://api.github.com/users/zikula/events{/privacy}","received_events_url":"https://api.github.com/users/zikula/received_events","type":"Organization","site_admin":false},"repo":{"id":781544,"name":"core","full_name":"zikula/core","owner":{"login":"zikula","id":251211,"avatar_url":"https://avatars.githubusercontent.com/u/251211?v=3","gravatar_id":"","url":"https://api.github.com/users/zikula","html_url":"https://github.com/zikula","followers_url":"https://api.github.com/users/zikula/followers","following_url":"https://api.github.com/users/zikula/following{/other_user}","gists_url":"https://api.github.com/users/zikula/gists{/gist_id}","starred_url":"https://api.github.com/users/zikula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zikula/subscriptions","organizations_url":"https://api.github.com/users/zikula/orgs","repos_url":"https://api.github.com/users/zikula/repos","events_url":"https://api.github.com/users/zikula/events{/privacy}","received_events_url":"https://api.github.com/users/zikula/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zikula/core","description":"Zikula Core Framework","fork":false,"url":"https://api.github.com/repos/zikula/core","forks_url":"https://api.github.com/repos/zikula/core/forks","keys_url":"https://api.github.com/repos/zikula/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zikula/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zikula/core/teams","hooks_url":"https://api.github.com/repos/zikula/core/hooks","issue_events_url":"https://api.github.com/repos/zikula/core/issues/events{/number}","events_url":"https://api.github.com/repos/zikula/core/events","assignees_url":"https://api.github.com/repos/zikula/core/assignees{/user}","branches_url":"https://api.github.com/repos/zikula/core/branches{/branch}","tags_url":"https://api.github.com/repos/zikula/core/tags","blobs_url":"https://api.github.com/repos/zikula/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zikula/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zikula/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/zikula/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zikula/core/statuses/{sha}","languages_url":"https://api.github.com/repos/zikula/core/languages","stargazers_url":"https://api.github.com/repos/zikula/core/stargazers","contributors_url":"https://api.github.com/repos/zikula/core/contributors","subscribers_url":"https://api.github.com/repos/zikula/core/subscribers","subscription_url":"https://api.github.com/repos/zikula/core/subscription","commits_url":"https://api.github.com/repos/zikula/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/zikula/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/zikula/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/zikula/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/zikula/core/contents/{+path}","compare_url":"https://api.github.com/repos/zikula/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zikula/core/merges","archive_url":"https://api.github.com/repos/zikula/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zikula/core/downloads","issues_url":"https://api.github.com/repos/zikula/core/issues{/number}","pulls_url":"https://api.github.com/repos/zikula/core/pulls{/number}","milestones_url":"https://api.github.com/repos/zikula/core/milestones{/number}","notifications_url":"https://api.github.com/repos/zikula/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zikula/core/labels{/name}","releases_url":"https://api.github.com/repos/zikula/core/releases{/id}","created_at":"2010-07-18T10:35:53Z","updated_at":"2015-08-23T03:41:15Z","pushed_at":"2015-09-07T13:30:31Z","git_url":"git://github.com/zikula/core.git","ssh_url":"git@github.com:zikula/core.git","clone_url":"https://github.com/zikula/core.git","svn_url":"https://github.com/zikula/core","homepage":"http://zikula.org/","size":66882,"stargazers_count":164,"watchers_count":164,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":76,"mirror_url":null,"open_issues_count":158,"forks":76,"open_issues":158,"watchers":164,"default_branch":"1.4"}},"_links":{"self":{"href":"https://api.github.com/repos/zikula/core/pulls/2580"},"html":{"href":"https://github.com/zikula/core/pull/2580"},"issue":{"href":"https://api.github.com/repos/zikula/core/issues/2580"},"comments":{"href":"https://api.github.com/repos/zikula/core/issues/2580/comments"},"review_comments":{"href":"https://api.github.com/repos/zikula/core/pulls/2580/comments"},"review_comment":{"href":"https://api.github.com/repos/zikula/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zikula/core/pulls/2580/commits"},"statuses":{"href":"https://api.github.com/repos/zikula/core/statuses/45f58afc144f162573c5158344534f6eb7b86d11"}}}}