26 public $mModuleTemplates = [];
28 public function __construct()
31 if (isset($initVars)) {
32 $this->mVars = $initVars;
35 $this->initVar(
'tplset_id', XOBJ_DTYPE_INT,
'',
true);
36 $this->initVar(
'tplset_name', XOBJ_DTYPE_STRING,
'',
true, 50);
37 $this->initVar(
'tplset_desc', XOBJ_DTYPE_STRING,
'',
true, 191);
38 $this->initVar(
'tplset_credits', XOBJ_DTYPE_TEXT,
'',
true);
39 $this->initVar(
'tplset_created', XOBJ_DTYPE_INT, time(),
true);
40 $initVars=$this->mVars;
43 public function loadModuletpl()
48 $moduleHandler =& xoops_gethandler(
'module');
49 $modules =& $moduleHandler->getObjects();
51 $tplfileHandler =& xoops_getmodulehandler(
'tplfile',
'legacyRender');
53 foreach ($modules as $module) {
56 $modtpl->set(
'mid', $module->get(
'mid'));
57 $modtpl->set(
'dirname', $module->get(
'dirname'));
58 $modtpl->set(
'name', $module->get(
'name'));
61 $criteria->add(
new Criteria(
'tpl_module', $module->get(
'dirname')));
62 $criteria->add(
new Criteria(
'tpl_tplset', $this->
get(
'tplset_name')));
64 $count = $tplfileHandler->getCount($criteria);
65 $modtpl->set(
'count', $count);
67 $this->mModuleTemplates[] =& $modtpl;