コード例 #1
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct('Configure', 'configure');
 }
コード例 #2
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct('ViewConfig', 'viewconfig');
 }
コード例 #3
0
ファイル: test.inc.php プロジェクト: sebastiendu/mmc
<?php

/**
 * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com
 * (c) 2007-2010 Mandriva, http://www.mandriva.com
 *
 * $Id$
 *
 * This file is part of Mandriva Management Console (MMC).
 *
 * MMC is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * MMC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MMC.  If not, see <http://www.gnu.org/licenses/>.
 */
include_once "modules/admin/includes/configure.inc.php";
$page = new ConfigurationPage("Test configuration", "test");
$options = array();
$options[] = new SelectOption("computers", "option_name", "test option", array("value1", "value2"));
$options[] = new SelectOption("computers", "option_name2", "test option2", array("value1", "value2"));
$page->addOptions('base', $options);
コード例 #4
0
 protected function ajaxGetNewGroup($setting, $group)
 {
     $settings = ConfigurationSettings::singleton(CONF_SETTINGS_BOTH);
     if ($settings->getSettingType($setting) != 'array') {
         return array('error', 'notarray');
     }
     $type = $settings->getArrayType($setting);
     switch ($type) {
         case 'group-bool':
             if (isset($GLOBALS[$setting]) && isset($GLOBALS[$setting][$group])) {
                 return array('error', 'exists');
             }
             $row = ConfigurationPage::buildGroupSettingRow($setting, $type, User::getAllRights(), true, $group, array());
             // Firefox seems to not like that :(
             return array('ajax', str_replace('&#160;', ' ', $row));
         case 'promotion-conds':
             if (isset($GLOBALS[$setting]) && isset($GLOBALS[$setting][$group])) {
                 return array('error', 'exists');
             }
             return array('ajax', ConfigurationPage::buildPromotionCondsSettingRow($setting, true, $group, array()));
         default:
             return array('error', 'notvalidarray');
     }
 }
コード例 #5
0
 /**
  * Same as before
  */
 public function getSettingValue($setting)
 {
     return parent::getSettingValue($setting);
 }