本文整理汇总了PHP中CGroups::loadList方法的典型用法代码示例。如果您正苦于以下问题:PHP CGroups::loadList方法的具体用法?PHP CGroups::loadList怎么用?PHP CGroups::loadList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGroups
的用法示例。
在下文中一共展示了CGroups::loadList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getAllConfigs
protected static function _getAllConfigs($class, $key, $value)
{
// Chargement des etablissements
$group = new CGroups();
/** @var CGroups[] $groups */
$groups = $group->loadList();
// Chargement des services
$service = new CService();
$services = $service->loadList();
// Chargement de toutes les configs
/** @var self $config */
$config = new $class();
/** @var self[] $all_configs */
$all_configs = $config->loadList();
if ($all_configs == null) {
return null;
}
/** @var self[] $configs_default */
// Creation du tableau de valeur par defaut (quelque soit l'etablissement)
foreach ($all_configs as $_config) {
if (!$_config->service_id && !$_config->group_id) {
$configs_default[$_config->{$key}] = $_config;
} else {
if ($_config->service_id) {
$configs_service[$_config->service_id][$_config->{$key}] = $_config->{$value};
} else {
$configs_group[$_config->group_id][$_config->{$key}] = $_config->{$value};
}
}
}
$configs = array();
// Parcours des etablissements
foreach ($groups as $group_id => $group) {
$group->loadRefsServices();
// Parcours des services
foreach ($group->_ref_services as $service_id => $_service) {
foreach ($configs_default as $_config_default) {
$configs[$group_id][$service_id][$_config_default->{$key}] = $_config_default->{$value};
if (isset($configs_group[$group_id][$_config_default->{$key}])) {
$configs[$group_id][$service_id][$_config_default->{$key}] = $configs_group[$group_id][$_config_default->{$key}];
}
if (isset($configs_service[$service_id][$_config_default->{$key}])) {
$configs[$group_id][$service_id][$_config_default->{$key}] = $configs_service[$service_id][$_config_default->{$key}];
}
}
}
// Si aucun service
foreach ($configs_default as $_config_default) {
if (isset($configs_group[$group_id][$_config_default->{$key}])) {
$configs[$group_id]["none"][$_config_default->{$key}] = $configs_group[$group_id][$_config_default->{$key}];
} else {
$configs[$group_id]["none"][$_config_default->{$key}] = $_config_default->{$value};
}
}
}
return $configs;
}
示例2: array
<?php
/**
* Configure
*
* @category EAI
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version SVN: $Id:$
* @link http://www.mediboard.org
*/
CCanDo::checkAdmin();
$object_servers = array("sip" => array("CSipObjectHandler"), "smp" => array("CSmpObjectHandler"), "sms" => array("CSmsObjectHandler"), "sa" => array("CSaObjectHandler", "CSaEventObjectHandler"));
$group = new CGroups();
$groups = $group->loadList();
foreach ($groups as $_group) {
$_group->loadConfigValues();
$_group->isIPPSupplier();
$_group->isNDASupplier();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("object_servers", $object_servers);
$smarty->assign("groups", $groups);
$smarty->display("configure.tpl");
示例3: CGroups
<?php
/**
* $Id: configure.php 19286 2013-05-26 16:59:04Z phenxdesign $
*
* @package Mediboard
* @subpackage Stock
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 19286 $
*/
CCanDo::checkAdmin();
$group = new CGroups();
$groups_list = $group->loadList(null, "text");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("groups_list", $groups_list);
$smarty->display('configure.tpl');