59 $this->_iHandler =
$helper->getHandlerItem();
60 $this->_oHandler =
$helper->getHandlerOption();
71 $instance = $this->_iHandler->create();
87 if ($withoptions ==
true) {
102 if (!$this->_iHandler->insert($config)) {
107 $conf_id = $config->
getVar(
'conf_id');
110 if (!$this->_oHandler->insert(
$options[
$i])) {
116 if (!empty($this->_cachedConfigs[$config->
getVar(
'conf_modid')][$config->
getVar(
'conf_uid')])) {
117 unset($this->_cachedConfigs[$config->
getVar(
'conf_modid')][$config->
getVar(
'conf_uid')]);
131 if (!$this->_iHandler->delete($config,
true)) {
145 if (!empty($this->_cachedConfigs[$config->
getVar(
'conf_modid')][$config->
getVar(
'conf_uid')])) {
146 unset($this->_cachedConfigs[$config->
getVar(
'conf_modid')][$config->
getVar(
'conf_uid')]);
172 return $this->_iHandler->getObjects(
$criteria2, $id_as_key);
184 return $this->_iHandler->getCount(
$criteria);
201 $ret[
$configs[
$i]->getVar(
'conf_name')] = $configs[
$i]->getConfValueForOutput();
248 $ret[
$configs[
$i]->getVar(
'conf_name')] = $configs[
$i]->getConfValueForOutput();
263 $inst = $this->_oHandler->create();
276 $inst = $this->_oHandler->get(
$id);
290 return $this->_oHandler->getObjects(
$criteria, $id_as_key);
302 return $this->_oHandler->getCount(
$criteria);
315 if (!empty($this->_cachedConfigs[$conf_modid][$conf_uid])) {
316 return $this->_cachedConfigs[$conf_modid][$conf_uid];
319 if (empty($conf_uid)) {
327 for (
$i = 0;
$i < $confcount; ++
$i) {
328 $ret[
$configs[
$i]->getVar(
'conf_name')] = $configs[
$i]->getConfValueForOutput();
330 $this->_cachedConfigs[$conf_modid][$conf_uid] = $ret;
338 if ($plugin = \
Xoops\Module\Plugin::getPlugin($module->
getVar(
'dirname'),
'userconfigs')) {
349 $confobj->setVar(
'conf_modid', $module->
getVar(
'mid'));
350 $confobj->setVar(
'conf_uid',
$uid);
351 $confobj->setVar(
'conf_name', $config[
'name']);
352 $confobj->setVar(
'conf_title', $config[
'title'],
true);
353 $confobj->setVar(
'conf_desc', $config[
'description'],
true);
354 $confobj->setVar(
'conf_formtype', $config[
'formtype']);
355 $confobj->setVar(
'conf_valuetype', $config[
'valuetype']);
356 $confobj->setConfValueForInput($config[
'default'],
true);
357 $confobj->setVar(
'conf_order', $order);
358 if (isset($config[
'options']) && is_array($config[
'options'])) {
359 foreach ($config[
'options'] as $key => $value) {
361 $confop->setVar(
'confop_name', $key,
true);
362 $confop->setVar(
'confop_value', $value,
true);
363 $confobj->setConfOptions($confop);
getConfigList($conf_modid, $conf_uid=0)
getConfig($id, $withoptions=false)
getConfigOptionsCount(CriteriaElement $criteria=null)
getConfigsByModule($module=0)
deleteConfig(UserconfigsItem $config)
insertConfig(UserconfigsItem $config)
getConfigsByUser($uid, $moduleId)
createDefaultUserConfigs($uid, XoopsModule $module)
deleteConfigsByModule($module=0)
getConfigs(CriteriaElement $criteria=null, $id_as_key=false)
getVar($key, $format= 's')
getConfigCount(CriteriaElement $criteria=null)
if(!$xoops->isUser()) $uid
getConfigOptions(CriteriaElement $criteria=null, $id_as_key=false)
if(!is_object($module)||!$module->getVar('isactive')) $msg