当前位置: 首页>>代码示例>>PHP>>正文


PHP self::loadList方法代码示例

本文整理汇总了PHP中self::loadList方法的典型用法代码示例。如果您正苦于以下问题:PHP self::loadList方法的具体用法?PHP self::loadList怎么用?PHP self::loadList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在self的用法示例。


在下文中一共展示了self::loadList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadRefsChildHierarchies

 /**
  * Charge les hiérarchies CsARR filles
  *
  * @return self[]
  */
 function loadRefsChildHierarchies()
 {
     $where["code"] = "LIKE '{$this->code}.__'";
     $hierarchie = new self();
     $hierarchies = $hierarchie->loadList($where);
     return $this->_ref_child_hierarchies = $hierarchies;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:12,代码来源:CHierarchieCsARR.class.php

示例2: loadCurrentList

 /**
  * Charge les prestations journalières de l'établissement
  * pour un éventuel type d'hospitalisation donné
  *
  * @param string $type Type d'hospitalisation
  *
  * @return self[]
  */
 static function loadCurrentList($type = null)
 {
     $prestation = new self();
     $where = array("group_id" => "= '" . CGroups::loadCurrent()->_id . "'");
     if ($type) {
         $where[] = "type_hospi IS NULL OR type_hospi = '{$type}'";
     }
     return $prestation->loadList($where, "nom");
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:17,代码来源:CPrestationJournaliere.class.php

示例3: get

 /**
  * Load user preferences as an associative array
  *
  * @param null $user_id The user to load the preferences from
  *
  * @return array
  */
 static function get($user_id = null, $restricted = false)
 {
     $where["user_id"] = "IS NULL";
     if ($user_id) {
         $where["user_id"] = "= '{$user_id}'";
         $where["value"] = "IS NOT NULL";
     }
     if ($restricted) {
         $where["restricted"] = "= '1'";
     }
     $preferences = array();
     $pref = new self();
     /** @var self[] $list */
     $list = $pref->loadList($where);
     foreach ($list as $_pref) {
         $preferences[$_pref->key] = $_pref->value;
     }
     return $preferences;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:26,代码来源:CPreferences.class.php

示例4: loadAllFor

 static function loadAllFor($libelles)
 {
     $libelles = array_map("strtoupper", $libelles);
     // Initialisation du tableau
     $colors_by_libelle = array();
     foreach ($libelles as $_libelle) {
         $color = new self();
         $color->libelle = $_libelle;
         $colors_by_libelle[$_libelle] = $color;
     }
     $color = new self();
     $where = array();
     $libelles = array_map("addslashes", $libelles);
     $where["libelle"] = CSQLDataSource::prepareIn($libelles);
     foreach ($color->loadList($where) as $_color) {
         $colors_by_libelle[$_color->libelle] = $_color;
     }
     return $colors_by_libelle;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:19,代码来源:CColorLibelleSejour.class.php

示例5: loadNewMessages

 /**
  * Load unread messages
  *
  * @param null $user_id user to load, null = current
  *
  * @return CUserMessageDest[]
  */
 static function loadNewMessages($user_id = null)
 {
     $dests = array();
     if (CModule::getActive("messagerie")) {
         $dest = new self();
         if ($dest->_ref_module->mod_version < 0.3) {
             CAppUI::stepAjax("CModule%s-msg-pls_update_module", UI_MSG_WARNING, $dest->_ref_module->mod_name);
             return $dests;
         }
         $user = CMediusers::get($user_id);
         $where = array();
         $where["to_user_id"] = " = '{$user->_id}'";
         $where["datetime_sent"] = " IS NOT NULL";
         $where["datetime_read"] = " IS NULL";
         /** @var CUserMessageDest[] $dests */
         $dests = $dest->loadList($where);
         foreach ($dests as $_dest) {
             $_dest->loadRefFwd();
         }
     }
     return $dests;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:29,代码来源:CUserMessageDest.class.php

示例6: getListTypesTree

 /**
  * Get list types tree
  *
  * @return array
  */
 static function getListTypesTree()
 {
     $object = new self();
     $group_id = CGroups::loadCurrent()->_id;
     $targets = array();
     $by_type = array();
     foreach ($object->_specs["type"]->_locales as $type => $trad) {
         if ($type != "intervention") {
             /** @var CSalle|CBlocOperatoire $_object */
             $_object = $type == "ouverture_salle" || $type == "fermeture_salle" ? new CSalle() : new CBlocOperatoire();
             $_targets = $_object->loadGroupList();
             array_unshift($_targets, $_object);
             $targets[$type] = array_combine(CMbArray::pluck($_targets, "_id"), $_targets);
             $where = array("type" => "= '{$type}'", "group_id" => "= '{$group_id}'", "check_list_group_id" => " IS NULL");
             $by_type[$type] = $object->loadList($where, "title");
         }
     }
     return array($targets, $by_type);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:24,代码来源:CDailyCheckListType.class.php

示例7: loadBrisForUser

 /**
  *
  *
  * @param null|int    $user_id
  * @param null|string $date_start
  * @param null|string $date_end
  * @param array       $object_classes
  *
  * @return CBrisDeGlace[] $briss
  */
 static function loadBrisForUser($user_id = null, $date_start = null, $date_end = null, $object_classes = array())
 {
     $date_start = $date_start ? $date_start : CMbDT::date();
     $date_end = $date_end ? $date_end : $date_start;
     $bris = new self();
     $ds = $bris->getDS();
     $where = array();
     $where["date"] = " BETWEEN '{$date_start} 00:00:00' AND '{$date_end} 23:59:59' ";
     if (count($object_classes)) {
         $where["object_class"] = $ds->prepareIn($object_classes);
     }
     if ($user_id) {
         $where["user_id"] = " = '{$user_id}'";
     }
     /** @var CBrisDeGlace[] $briss */
     $briss = $bris->loadList($where, "date DESC");
     return $briss;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:28,代码来源:CBrisDeGlace.class.php

示例8: getCategoriesTree

 /**
  * Get categories tree
  *
  * @param bool $operation see operations
  *
  * @return array
  */
 static function getCategoriesTree($operation = false)
 {
     $object = new self();
     $target_classes = CDailyCheckList::getNonHASClasses($operation);
     $targets = array();
     $by_class = array();
     foreach ($target_classes as $_class) {
         if ($_class != "COperation") {
             /** @var CSalle|CBlocOperatoire $_object */
             $_object = new $_class();
             //$_targets = $_object->loadGroupList();
             $_targets = $_object->loadList();
             array_unshift($_targets, $_object);
             $targets[$_class] = array_combine(CMbArray::pluck($_targets, "_id"), $_targets);
         }
         $where = array("target_class" => "= '{$_class}'");
         if ($_class == "COperation") {
             $where["list_type_id"] = ' IS NOT NULL';
         }
         /** @var CDailyCheckItemCategory[] $_list */
         $_list = $object->loadList($where, "target_id+0, title");
         // target_id+0 to have NULL at the beginning
         $by_object = array();
         foreach ($_list as $_category) {
             $_key = $_category->target_id ? $_category->target_id : "all";
             $by_object[$_key][$_category->_id] = $_category;
         }
         $by_class[$_class] = $by_object;
     }
     return array($targets, $by_class);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:38,代码来源:CDailyCheckItemCategory.class.php

示例9: getAllFor

 /**
  * Get all the instant data for an object
  *
  * @param CMbObject $object The object to get timed data of
  *
  * @return self[]
  */
 static function getAllFor(CMbObject $object)
 {
     $graph = new self();
     $where = array("owner_class" => "= '{$object->_class}'", "owner_id" => "= '{$object->_id}'");
     return $graph->loadList($where, "title");
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:13,代码来源:CSupervisionInstantData.class.php

示例10: getAllFor

 /**
  * Get all pakcs from an object
  *
  * @param CMbObject $object        The object to get the packs of
  * @param bool      $with_disabled List disabled items
  *
  * @return self[]
  */
 static function getAllFor(CMbObject $object, $with_disabled = false)
 {
     $pack = new self();
     $where = array("owner_class" => "= '{$object->_class}'", "owner_id" => "= '{$object->_id}'");
     if (!$with_disabled) {
         $where["disabled"] = "= '0'";
     }
     return $pack->loadList($where, "title");
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:17,代码来源:CSupervisionGraphPack.class.php

示例11: getForObject

 /**
  * Get events for an object
  *
  * @param CMbObject|string $object                     Object or GUID
  * @param string           $event_name                 Event name
  * @param string           $type                       Type: required, disabled or conditional
  * @param array            $exclude_ex_class_event_ids List of class events' ids
  *
  * @return CExClassEvent[]
  */
 static function getForObject($object, $event_name, $type = "required", $exclude_ex_class_event_ids = array())
 {
     static $events_cache = array();
     if (is_string($object)) {
         $object = CMbObject::loadFromGuid($object);
     }
     if ($type == "required" && !CValue::read($object->_spec->events[$event_name], "auto", false)) {
         return array();
     }
     $ex_class_event = new self();
     $group_id = CGroups::loadCurrent()->_id;
     $ds = $ex_class_event->_spec->ds;
     $key = "{$object->_class}/{$event_name}/{$group_id}/{$type}";
     if (isset($events_cache[$key])) {
         $ex_class_events = $events_cache[$key];
     } else {
         $where = array("ex_class_event.host_class" => $ds->prepare("=%", $object->_class), "ex_class_event.event_name" => $ds->prepare("=%", $event_name), "ex_class_event.disabled" => $ds->prepare("=%", 0), "ex_class.conditional" => $ds->prepare("=%", 0), $ds->prepare("ex_class.group_id = % OR group_id IS NULL", $group_id));
         $ljoin = array("ex_class" => "ex_class.ex_class_id = ex_class_event.ex_class_id");
         switch ($type) {
             case "disabled":
                 $where["ex_class_event.disabled"] = 1;
                 break;
             case "conditional":
                 $where["ex_class.conditional"] = 1;
                 break;
         }
         /** @var CExClassEvent[] $ex_class_events */
         $ex_class_events = $ex_class_event->loadList($where, null, null, null, $ljoin);
         $events_cache[$key] = $ex_class_events;
     }
     foreach ($ex_class_events as $_id => $_ex_class_event) {
         if (isset($exclude_ex_class_event_ids[$_id]) || !$_ex_class_event->checkConstraints($object)) {
             unset($ex_class_events[$_id]);
         } else {
             $_ex_class_event->_host_object = $object;
         }
     }
     return $ex_class_events;
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:49,代码来源:CExClassEvent.class.php

示例12: loadExactSiblings

 /**
  * Charge les médecins identiques
  *
  * @param bool $strict_cp Stricte sur la recherche par code postal
  *
  * @return self[]
  */
 function loadExactSiblings($strict_cp = true)
 {
     $medecin = new self();
     $where = array();
     $where["nom"] = $this->_spec->ds->prepare(" = %", $this->nom);
     $where["prenom"] = $this->_spec->ds->prepare(" = %", $this->prenom);
     if (!$strict_cp) {
         $cp = substr($this->cp, 0, 2);
         $where["cp"] = " LIKE '{$cp}___'";
     } else {
         $where["cp"] = " = '{$this->cp}'";
     }
     $medecin->escapeValues();
     $siblings = $medecin->loadList($where);
     unset($siblings[$this->_id]);
     return $siblings;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:24,代码来源:CMedecin.class.php

示例13: getAllTherapeutes

 /**
  * Find all therapeutes for a patient 
  * 
  * @param ref $patient_id  Patient
  * @param ref $function_id May restrict to a function
  * 
  * @return CMediusers[]
  */
 static function getAllTherapeutes($patient_id, $function_id = null)
 {
     // Filter on patient
     $join["sejour"] = "sejour.sejour_id = evenement_ssr.sejour_id";
     $where["patient_id"] = "= '{$patient_id}'";
     // Filter on function
     if ($function_id) {
         $join["users_mediboard"] = "users_mediboard.user_id = evenement_ssr.therapeute_id";
         $where["function_id"] = "= '{$function_id}'";
     }
     // Load grouped
     $group = "therapeute_id";
     $evenement = new self();
     $evenements = $evenement->loadList($where, null, null, $group, $join);
     // Load therapeutes
     $therapeutes = CMbObject::massLoadFwdRef($evenements, "therapeute_id");
     foreach ($therapeutes as $_therapeute) {
         $_therapeute->loadRefFunction();
     }
     return $therapeutes;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:29,代码来源:CEvenementSSR.class.php

示例14: getTree

 /**
  * @param string $object_class
  * @param CTag   $parent
  * @param array  $tree
  *
  * @return array
  */
 static function getTree($object_class, CTag $parent = null, &$tree = array())
 {
     $tag = new self();
     $where = array("object_class" => "= '{$object_class}'", "parent_id" => $parent && $parent->_id ? "= '{$parent->_id}'" : "IS NULL");
     $tree["parent"] = $parent;
     $tree["children"] = array();
     /** @var self[] $tags */
     $tags = $tag->loadList($where, "name");
     foreach ($tags as $_tag) {
         $_tag->getDeepness();
         self::getTree($object_class, $_tag, $sub_tree);
         $tree["children"][] = $sub_tree;
     }
     return $tree;
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:22,代码来源:CTag.class.php

示例15: upgradeAll

 /**
  * Upgrade all modules
  *
  * @return void
  */
 static function upgradeAll()
 {
     $module = new self();
     /** @var self[] $installed */
     $installed = $module->loadList();
     $upgradeables = array();
     foreach ($installed as $_module) {
         $setupClass = "CSetup{$_module->mod_name}";
         if (!class_exists($setupClass)) {
             continue;
         }
         /** @var CSetup $setup */
         $setup = new $setupClass();
         $_module->compareToSetup($setup);
         if ($_module->_upgradable) {
             $upgradeables[$_module->mod_name] = array("module" => $_module, "setup" => $setup);
         }
     }
     foreach ($upgradeables as $_upgrade) {
         /** @var CModule $_module */
         $_module = $_upgrade["module"];
         /** @var CSetup $_setup */
         $_setup = $_upgrade["setup"];
         if ($_module->mod_version = $_setup->upgrade($_module->mod_version)) {
             $_module->mod_type = $_setup->mod_type;
             $_module->store();
             if ($_setup->mod_version == $_module->mod_version) {
                 CAppUI::setMsg("Installation de '%s' à la version %s", UI_MSG_OK, $_module->mod_name, $_setup->mod_version);
             } else {
                 CAppUI::setMsg("Installation de '{$_module->mod_name}' à la version {$_module->mod_version} sur {$_setup->mod_version}", UI_MSG_WARNING, true);
             }
         } else {
             CAppUI::setMsg("Module '%s' non mis à jour", UI_MSG_WARNING, $_module->mod_name);
         }
     }
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:41,代码来源:CModule.class.php


注:本文中的self::loadList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。