本文整理汇总了PHP中Module::setPriority方法的典型用法代码示例。如果您正苦于以下问题:PHP Module::setPriority方法的具体用法?PHP Module::setPriority怎么用?PHP Module::setPriority使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Module
的用法示例。
在下文中一共展示了Module::setPriority方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Module
* (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/>.
*/
/**
* report module declaration
*/
$MMCApp =& MMCApp::getInstance();
$mod = new Module("report");
$mod->setVersion("3.1.83");
$mod->setRevision('');
$mod->setDescription(_T("Reporting", "report"));
$mod->setAPIVersion("0:0:0");
$mod->setPriority(990);
$submod = new SubModule("report", _T("Report", "report"));
$submod->setDefaultPage("report/report/index");
$submod->setImg('modules/report/graph/navbar/report');
$submod->setPriority(990);
$page = new Page("index", _T("Report creation", "report"));
$submod->addPage($page);
$page = new Page("get_file", _T("Download a file from report module (report or PNG)", "report"));
$page->setOptions(array("visible" => False, "noHeader" => True));
$submod->addPage($page);
$mod->addSubmod($submod);
$MMCApp->addModule($mod);
示例2: Module
* You should have received a copy of the GNU General Public License
* along with MMC. If not, see <http://www.gnu.org/licenses/>.
*/
/* require_once("modules/ppolicy/includes/ppolicy-xmlrpc.php"); */
/* require_once("modules/ppolicy/includes/ppolicy.inc.php"); */
/**
* ppolicy module declaration
*/
/* require_once("modules/admin/includes/admin.inc.php"); */
require_once "modules/admin/includes/commons.inc.php";
$mod = new Module("admin");
$mod->setVersion("3.1.1");
$mod->setRevision('$Rev$');
$mod->setDescription(_T("Configuration", "admin"));
$mod->setAPIVersion("4.1.3");
$mod->setPriority(600);
/* Add the page to the module */
$submod = new SubModule("configure");
$submod->setVisibility(True);
$submod->setDescription(_T("Administration"));
$submod->setDefaultPage("admin/configure/index");
$submod->setImg('img/navbar/load');
$mod->addSubmod($submod);
/* Add the (yet empty) module to the app */
$MMCApp = MMCApp::getInstance();
$MMCApp->addModule($mod);
unset($MMCApp);
/* Load all configuration page found in the "pages" directory, they will
be added to the main submodule
*/
loadAllConfigurationPages();
示例3: Module
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* module declaration
*/
require_once "modules/mail/includes/mail-xmlrpc.php";
$mod = new Module("mail");
$mod->setVersion("2.4.92");
$mod->setRevision('$Rev$');
$mod->setDescription(_T("Mail management", "mail"));
$mod->setAPIVersion("7:0:0");
$mod->setPriority(10);
$attrs = getMailAttributes();
$mod->addACL("mailaccess", _T("Mail access", "mail"));
$mod->addACL("maildisable", _T("Disable mail delivery", "mail"));
$mod->addACL($attrs["mailalias"], _T("Mail aliases", "mail"));
$mod->addACL($attrs["mailbox"], _T("Mail delivery path", "mail"));
$mod->addACL($attrs["mailhost"], _T("Mail server host", "mail"));
$mod->addACL($attrs["mailuserquota"], _T("Mail user quota", "mail"));
$mod->addACL("mailgroupaccess", _T("Mail group alias access", "mail"));
$showAliasesModule = True;
if (hasVDomainSupport()) {
$showAliasesModule = False;
$submod = new SubModule("domains");
$submod->setDescription(_T("Mail", "mail"));
$submod->setImg('modules/mail/graph/img/mail');
$submod->setDefaultPage("mail/domains/index");
示例4: Module
* You should have received a copy of the GNU General Public License
* along with MMC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once "modules/base/includes/computers.inc.php";
require_once "modules/base/includes/logging-xmlrpc.inc.php";
require_once "modules/base/includes/users-xmlrpc.inc.php";
/**
* module declaration
*/
$mod = new Module("base");
$mod->setVersion("3.0.94");
$mod->setRevision('$Rev$');
$mod->setAPIVersion("9:0:5");
$mod->setDescription(_("User, group and computer management"));
$mod->setPriority(0);
/**
* define main submod
*/
$submod = new SubModule("main", _("Home"));
$submod->setVisibility(False);
$submod->setDefaultPage("base/main/default");
$submod->setPriority(0);
$page = new Page("default", _("Shortcuts"));
$page->setOptions(array("visible" => False));
$submod->addPage($page);
$page = new Page("favorites", _("Favorites page"));
$page->setOptions(array("visible" => False, "AJAX" => True));
$submod->addPage($page);
$mod->addSubmod($submod);
/* Audit module */
示例5: Module
* module declaration
*/
require_once "modules/pulse2/version.php";
$MMCApp =& MMCApp::getInstance();
/* Get the base module instance */
$base =& $MMCApp->getModule('base');
/* Get the computers sub-module instance */
$submod =& $base->getSubmod('computers');
/* Set up MSC pages only when the computers module is available */
if (!empty($submod)) {
$mod = new Module("msc");
$mod->setVersion(VERSION);
$mod->setRevision(REVISION);
$mod->setDescription(_T("Secure Control", "msc"));
$mod->setAPIVersion("0:0:0");
$mod->setPriority(700);
$submodmsc = new SubModule("logs", _T("Audit", "msc"));
$submodmsc->setImg('modules/msc/img/navbar/msc');
$submodmsc->setDefaultPage("msc/logs/consult");
$page = new Page("consult", _T('My commands', 'msc'));
$submodmsc->addPage($page);
$page = new Page("consultAll", _T('All user commands', 'msc'));
$submodmsc->addPage($page);
$page = new Page("viewLogs", _T('Commands logs', 'msc'));
$submodmsc->addPage($page);
$page = new Page("all", _T('Show all logs', 'msc'));
$submodmsc->addPage($page);
$page = new Page("pending", _T('Show pending task\'s logs', 'msc'));
$submodmsc->addPage($page);
$page = new Page("running", _T('Show running task\'s logs', 'msc'));
$submodmsc->addPage($page);
示例6: _createSamba4SharesSubmodule
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author(s):
* Julien Kerihuel <jkerihuel@zentyal.com>
* Miguel Julián <mjulian@zentyal.com>
*/
require "modules/samba4/includes/common-xmlrpc.inc.php";
/**
* module declaration
*/
$module = new Module("samba4");
$module->setVersion("1.0.1");
$module->setRevision('$Rev$');
$module->setDescription(_T("SAMBA4 management"), "samba4");
$module->setAPIVersion("1:0:1");
$module->setPriority(20);
$isProvisioned = isSamba4Provisioned();
$sharesSubmodule = _createSamba4SharesSubmodule($isProvisioned);
$module->addSubmod($sharesSubmodule);
$machinesSubmodule = _createSamba4MachinesSubmodule($isProvisioned);
$module->addSubmod($machinesSubmodule);
$configSubmodule = _createSamba4ConfigSubmodule($isProvisioned);
$module->addSubmod($configSubmodule);
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($module);
function _createSamba4SharesSubmodule($isProvisioned)
{
$submodule = new SubModule("shares");
$submodule->setDescription(_T("Shares", "samba4"));
$submodule->setImg('modules/samba4/graph/navbar/share');
$submodule->setDefaultPage("samba4/shares/index");
示例7: Module
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MMC; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'modules/network/includes/network-xmlrpc.inc.php';
/**
* module declaration
*/
$mod = new Module("network");
$mod->setVersion("2.5.95");
$mod->setRevision('$Rev$');
$mod->setDescription(_T("Network management", "network"));
$mod->setAPIVersion('2:1:0');
$mod->setPriority(30);
/**
* user submod definition
*/
$submod = new SubModule("network");
$submod->setDescription(_T("Network", "network"));
$submod->setImg('modules/network/graph/img/network');
$submod->setDefaultPage("network/network/index");
$submod->setPriority(30);
$visibleDNS = True;
if (!hasDNS()) {
$submod->setDefaultPage("network/network/subnetindex");
$visibleDNS = False;
}
$visibleDHCP = True;
if (!hasDHCP()) {
示例8: Module
* 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/>.
*/
/**
* dashboard module declaration
*/
require_once "modules/pulse2/version.php";
$mod = new Module("support");
$mod->setVersion(VERSION);
$mod->setRevision(REVISION);
$mod->setDescription(_T("Support", "support"));
$mod->setAPIVersion("0:0:0");
$mod->setPriority(500);
$submod = new SubModule("support", _T("Remote support", "support"));
$submod->setDefaultPage("support/support/index");
$submod->setVisibility(false);
$submod->setPriority(110);
$page = new Page("collect", _T("Collect", "support"));
$submod->addPage($page);
$page = new Page("connect", _T("Connect", "support"));
$submod->addPage($page);
$page = new Page("disconnect", _T("Disconnect", "support"));
$submod->addPage($page);
$page = new Page("get_file", _T("Download an archive including logs and config files", "support"));
$submod->addPage($page);
$mod->addSubmod($submod);
$MMCApp =& MMCApp::getInstance();
$MMCApp->addModule($mod);