本文整理汇总了PHP中CApp::getInstalledClasses方法的典型用法代码示例。如果您正苦于以下问题:PHP CApp::getInstalledClasses方法的具体用法?PHP CApp::getInstalledClasses怎么用?PHP CApp::getInstalledClasses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CApp
的用法示例。
在下文中一共展示了CApp::getInstalledClasses方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
if (count($values) == 1) {
$statuses[$field] = "unique";
continue;
}
// Multiple values
$statuses[$field] = count(array_unique($values)) == 1 ? "duplicate" : "multiple";
}
$result->updateFormFields();
$result->loadAllFwdRefs(true);
}
// Count statuses
$counts = array("none" => 0, "unique" => 0, "duplicate" => 0, "multiple" => 0);
foreach ($statuses as $status) {
$counts[$status]++;
}
$classes = $readonly_class ? array() : CApp::getInstalledClasses();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("objects", $objects);
$smarty->assign("objects_class", $objects_class);
$smarty->assign("objects_id", $objects_id);
$smarty->assign("merge_type", $merge_type);
$smarty->assign("result", $result);
$smarty->assign("statuses", $statuses);
$smarty->assign("user", $user);
$smarty->assign("counts", $counts);
$smarty->assign("checkMerge", $checkMerge);
$smarty->assign("mode", $mode);
$smarty->assign("list_classes", $classes);
$smarty->assign("alternative_mode", CAppUI::conf("alternative_mode"));
$smarty->assign("readonly_class", $readonly_class);
示例2: intval
* @package Mediboard
* @subpackage sante400
* @version $Revision: 28748 $
* @author SARL OpenXtrem
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
*/
CCanDo::checkRead();
$canSante400 = CModule::getCanDo("dPsante400");
$dialog = CValue::get("dialog");
$page = intval(CValue::get('page', 0));
// Chargement du filtre
$filter = new CIdSante400();
$filter->object_id = CValue::get("object_id");
$filter->object_class = CValue::get("object_class");
$filter->tag = CValue::get("tag");
$filter->id400 = CValue::get("id400");
$filter->nullifyEmptyFields();
// Récupération de la liste des classes disponibles
if ($filter->object_class && $filter->object_id) {
$listClasses = array($filter->object_class);
} else {
$listClasses = CApp::getInstalledClasses();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("page", $page);
$smarty->assign("filter", $filter);
$smarty->assign("canSante400", $canSante400);
$smarty->assign("listClasses", $listClasses);
$smarty->assign("dialog", $dialog);
$smarty->display("view_identifiants.tpl");
示例3: array
* $Id: check_zombie_objects.php 24615 2014-09-01 10:52:44Z phenxdesign $
*
* @package Mediboard
* @subpackage developpement
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 24615 $
*/
CCanDo::checkRead();
$class = CValue::getOrSession('class', 'CPatient');
$objects_count = CValue::getOrSession('objects_count', 20);
$count = 0;
$zombies = array();
/** @var CStoredObject $object */
$object = new $class();
$installed_classes = CApp::getInstalledClasses();
$ds = $object->_spec->ds;
if ($object->_spec->table) {
$object->makeAllBackSpecs();
foreach ($object->_backSpecs as $name => $back_spec) {
/** @var CStoredObject $back_object */
$back_object = new $back_spec->class();
$fwd_spec = $back_object->_specs[$back_spec->field];
// Check the back ref only if the class's module is installed
if (!in_array($back_spec->class, $installed_classes)) {
continue;
}
$queryCount = "SELECT COUNT(*) AS total ";
$queryLoad = "SELECT `back_obj`.* ";
$query = "FROM `{$back_object->_spec->table}` AS `back_obj`\r\n LEFT JOIN `{$object->_spec->table}` AS `obj` ON `obj`.`{$object->_spec->key}` = `back_obj`.`{$back_spec->field}`\r\n WHERE `obj`.`{$object->_spec->key}` IS NULL \r\n AND `back_obj`.`{$back_spec->field}` IS NOT NULL";
if ($field_meta = $fwd_spec->meta) {
示例4: getTemplatedClasses
/**
* Construit un tableau de traduction des classes pour lesquelles la fonction filltemplate existe
*
* @return array
*/
static function getTemplatedClasses()
{
if (self::$templated_classes !== null) {
return self::$templated_classes;
}
$all_classes = array("CConsultAnesth", "CConsultation", "COperation", "CPatient", "CSejour", "CFactureCabinet", "CFactureEtablissement", 'CDevisCodage');
if (CModule::getActive("dPprescription")) {
$all_classes[] = "CPrescription";
}
$installed = CApp::getInstalledClasses($all_classes);
$classes = array();
foreach ($installed as $class) {
if (is_method_overridden($class, 'fillTemplate') || is_method_overridden($class, 'fillLimitedTemplate')) {
$classes[$class] = CAppUI::tr($class);
}
}
if (!count($classes)) {
$classes["CMbObject"] = CAppUI::tr("CMbObject");
}
return self::$templated_classes = $classes;
}
示例5: getClassesFor
/**
* Get all classes for a given module
*
* @param string $module Module name
*
* @return array[string] Class names
**/
static function getClassesFor($module)
{
// Liste des Class
$listClass = CApp::getInstalledClasses();
$tabClass = array();
foreach ($listClass as $class) {
$object = new $class();
if (!is_object($object->_ref_module)) {
continue;
}
if ($object->_ref_module->mod_name == $module) {
$tabClass[] = $object->_class;
}
}
return $tabClass;
}
示例6: CAideSaisie
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version SVN: $Id:\$
* @link http://www.mediboard.org
*/
CCanDo::checkRead();
$filtre = new CAideSaisie();
// Utilisateur sélectionné ou utilisateur courant
$filtre->user_id = CView::get("user_id", "num pos", true);
$filtre->function_id = CView::get("function_id", "num pos", true);
$filtre->class = CView::get("class", "str", true);
$keywords = CView::get("keywords", "str", true);
$start = CValue::getOrSession("start", array("user" => 0, "func" => 0, "etab" => 0));
$order_col_aide = CView::get("order_col_aide", "enum list|class|field|depend_value_1|depend_value_2|name default|class", true);
$order_way = CView::get("order_way", "enum list|ASC|DESC default|ASC", true);
CView::checkin();
$classes = array_flip(CApp::getInstalledClasses());
// Chargement des classes possibles pour les aides à la saisie
foreach ($classes as $class => &$infos) {
$object = new $class();
$infos = array();
foreach ($object->_specs as $field => $spec) {
if (!isset($spec->helped)) {
continue;
}
$info =& $infos[$field];
if (!is_array($spec->helped)) {
$info = null;
}
}
}
CMbArray::removeValue(array(), $classes);