本文整理汇总了PHP中CModule::exists方法的典型用法代码示例。如果您正苦于以下问题:PHP CModule::exists方法的具体用法?PHP CModule::exists怎么用?PHP CModule::exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CModule
的用法示例。
在下文中一共展示了CModule::exists方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
}
}
}
foreach ($features as $_prefix => $values) {
addConfigConfigCategory($module, $_prefix, null, false);
addConfigConfigCategory($module, $_prefix, $values);
}
}
if ($categories = @CAppUI::conf($module)) {
foreach ($categories as $category => $values) {
addConfigConfigCategory($module, $category, $values);
}
}
if ($module == "system") {
foreach (CAppUI::conf() as $chapter => $values) {
if (!CModule::exists($chapter) && $chapter != "db") {
addConfigConfigCategory(null, $chapter, $values);
}
}
}
if ($module != "common") {
$files = CAppUI::readFiles("modules/{$module}", '\\.php$');
addLocale("Module", "Name", "module-{$module}-court");
addLocale("Module", "Name", "module-{$module}-long");
foreach ($files as $_file) {
$_tab = substr($_file, 0, -4);
if (in_array($_tab, array("setup", "index", "config", "preferences", "configuration"))) {
continue;
}
addLocale("Module", "Tabs", "mod-{$module}-tab-{$_tab}");
}
示例2: array
$where = array();
$where["cancelled"] = "= '0'";
$service = new CService();
$services = $service->loadGroupList($where);
// Contraintes sur le mode de sortie / destination
$contrainteDestination["mutation"] = array("", 1, 2, 3, 4);
$contrainteDestination["transfert"] = array("", 1, 2, 3, 4);
$contrainteDestination["normal"] = array("", 6, 7);
// Contraintes sur le mode de sortie / orientation
$contrainteOrientation["transfert"] = array("", "HDT", "HO", "SC", "SI", "REA", "UHCD", "MED", "CHIR", "OBST");
$contrainteOrientation["normal"] = array("", "FUGUE", "SCAM", "PSA", "REO");
// Praticiens urgentistes
$listPrats = $user->loadPraticiens(PERM_READ, $group->service_urgences_id);
// Si accès au module PMSI : peut modifier le diagnostic principal
$access_pmsi = 0;
if (CModule::exists("dPpmsi")) {
$module = new CModule();
$module->mod_name = "dPpmsi";
$module->loadMatchingObject();
$access_pmsi = $module->getPerm(PERM_EDIT);
}
// Si praticien : peut modifier le CCMU, GEMSA et diagnostic principal
$is_praticien = CAppUI::$user->isPraticien();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("contrainteDestination", $contrainteDestination);
$smarty->assign("contrainteOrientation", $contrainteOrientation);
$smarty->assign("services", $services);
$smarty->assign("listPrats", $listPrats);
$smarty->assign("sejour", $sejour);
$smarty->assign("access_pmsi", $access_pmsi);
示例3: array
//view list
// PATTERN : MODULE , AJAX, TYPE
$mods_available = array("patient" => array("dPpatients", "ajax_vw_patient_complete", "patient"), "soins" => array("soins", "vw_dossier_sejour", "sejour"), "labo" => array("dPImeds", "httpreq_vw_sejour_results", "sejour"));
//-----------------------------------------------------------------
// VIEWS
// view = none
if ($view == "none") {
CAppUI::stepAjax("context-view_required", UI_MSG_ERROR);
}
//view not registered
if (!array_key_exists($view, $mods_available)) {
CAppUI::stepAjax("context-view_not-registered", UI_MSG_ERROR, $view);
}
//check for module (with hack)
$this_module = $mods_available[$view][0];
if (!CModule::exists($this_module) && !CModule::exists("dP{$this_module}")) {
CAppUI::stepAjax("context-module%s-not-activated", UI_MSG_ERROR, $this_module);
}
//PATIENT
//find a patient
$patient = new CPatient();
//IPP Case
if ($ipp) {
$patient->_IPP = $ipp;
$patient->loadFromIPP();
if ($patient->_id) {
$nbpatients = 1;
}
}
//global case
if (!$nbpatients) {