1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: namespace Xoops\Core\Theme;
13:
14: /**
15: * Admin theme factory
16: *
17: * @category Xoops\Core
18: * @package Theme
19: * @author Andricq Nicolas (AKA MusS)
20: * @author trabis <lusopoemas@gmail.com>
21: * @copyright 2009-2015 XOOPS Project (http://xoops.org)
22: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
23: * @link http://xoops.org
24: */
25: class AdminFactory extends Factory
26: {
27: /**
28: * Create an admin theme instance
29: *
30: * @param array $options theme options
31: *
32: * @return XoopsTheme
33: */
34: public function createInstance($options = array())
35: {
36: $options["plugins"] = array();
37: $options['renderBanner'] = false;
38: $inst = parent::createInstance($options);
39: $inst->path = \XoopsBaseConfig::get('adminthemes-path') . '/' . $inst->folderName;
40: $inst->url = \XoopsBaseConfig::get('adminthemes-url') . '/' . $inst->folderName;
41: $inst->template->assign(array(
42: 'theme_path' => $inst->path, 'theme_tpl' => $inst->path . '/xotpl', 'theme_url' => $inst->url,
43: 'theme_img' => $inst->url . '/img', 'theme_icons' => $inst->url . '/icons',
44: 'theme_css' => $inst->url . '/css', 'theme_js' => $inst->url . '/js',
45: 'theme_lang' => $inst->url . '/language',
46: ));
47:
48: return $inst;
49: }
50: }
51: