XOOPS  2.6.0
modules.php
Go to the documentation of this file.
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 
21 {
25  public function __construct($obj = null)
26  {
27  }
28 
32  public function getModulesForm($mod = null)
33  {
35  $mid = 0;
36  if ($mod instanceof XoopsModule) {
37  $mid = $mod->getVar('mid');
38  }
39  /* @var $plugin UserconfigsPluginInterface */
40  if ($plugins = \Xoops\Module\Plugin::getPlugins('userconfigs')) {
41  parent::__construct('', 'pref_form', 'index.php', 'post', true, 'inline');
42 
44  foreach (array_keys($plugins) as $dirname) {
45  $mHelper = $xoops->getModuleHelper($dirname);
46  $ele->addOption($mHelper->getModule()->getVar('mid'), $mHelper->getModule()->getVar('name'));
47  }
48  $this->addElement($ele);
49  $this->addElement(new Xoops\Form\Hidden('op', 'showmod'));
50  $this->addElement(new Xoops\Form\Button('', 'button', XoopsLocale::A_SUBMIT, 'submit'));
51  }
52  }
53 }
$mid
Definition: index.php:39
const A_SUBMIT
Definition: en_US.php:128
const _MD_USERCONFIGS_CHOOSE_MODULE
Definition: main.php:25
static getInstance()
Definition: Xoops.php:160
getModulesForm($mod=null)
Definition: modules.php:32
addElement(Element $formElement, $required=false)
Definition: Form.php:206
$xoops
Definition: admin.php:25
__construct($obj=null)
Definition: modules.php:25
$dirname
Definition: backend.php:38