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


PHP Kernel::getTree方法代码示例

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


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

示例1: processGetTree

 /**
  * getTree
  *
  * DEBUG: Affiche l'arbre d'information de l'utilisateur connecté.
  * @author	Frédéric Mossmann <fmossmann@cap-tic.fr>
  */
 public function processGetTree()
 {
     $tpl = new CopixTpl();
     $tpl->assign('TITLE_PAGE', "getTree");
     $tpl->assign('MAIN', '<pre>' . print_r(Kernel::getTree(), true) . '</pre>');
     return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl);
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:13,代码来源:default.actiongroup.php

示例2: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $tree = Kernel::getTree();
     $tpl->assign('tree', $tree);
     $toReturn = $tpl->fetch('navigation.tpl');
     // $toReturn = '<pre>'.print_r($tree,true).'</pre>';
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:9,代码来源:navigation.zone.php

示例3: getTree

 public function getTree($racine_type = "ROOT", $racine_node = 0)
 {
     switch ($racine_type) {
         case "ROOT":
             // Recherche des groupes dans l'ENT...
             $grv_dao = _dao("kernel|kernel_tree_grv");
             $grv_list = $grv_dao->findAll();
             $tree->groupes = array();
             foreach ($grv_list as $key => $value) {
                 $tree->groupes[$value->grv_id_grv]->info["nom"] = $value->grv_nom_groupe;
                 $tree->groupes[$value->grv_id_grv]->info["crea"] = $value->grv_date_creation;
                 $tree->groupes[$value->grv_id_grv]->info["level"] = 0 + Kernel::getLevel('BU_GRVILLE', $value->grv_id_grv);
                 // Recherche des villes dans chaque groupe trouvÈ
                 $villes = Kernel::getTree("BU_GRVILLE", $value->grv_id_grv);
                 $tree->groupes[$value->grv_id_grv]->villes = $villes->villes;
             }
             break;
         case "BU_GRVILLE":
             // Recherche des villes dans un groupe...
             $vil_dao = _dao("kernel|kernel_tree_vil");
             $vil_list = $vil_dao->getByGroupeVille($racine_node);
             $tree->villes = array();
             foreach ($vil_list as $key => $value) {
                 $tree->villes[$value->vil_id_vi]->info["nom"] = $value->vil_nom;
                 $tree->villes[$value->vil_id_vi]->info["crea"] = $value->vil_date_creation;
                 $tree->villes[$value->vil_id_vi]->info["level"] = 0 + Kernel::getLevel('BU_VILLE', $value->vil_id_vi);
                 // Recherche des ecoles dans chaque ville trouvÈe
                 $ecoles = Kernel::getTree("BU_VILLE", $value->vil_id_vi);
                 $tree->villes[$value->vil_id_vi]->ecoles = $ecoles->ecoles;
             }
             break;
         case "BU_VILLE":
             // Recherche des Ècoles dans une ville...
             $eco_dao = _dao("kernel|kernel_tree_eco");
             $eco_list = $eco_dao->getByVille($racine_node);
             $tree->ecoles = array();
             foreach ($eco_list as $key => $value) {
                 $tree->ecoles[$value->eco_numero]->info["nom"] = $value->eco_nom;
                 $tree->ecoles[$value->eco_numero]->info["type"] = $value->eco_type;
                 $tree->ecoles[$value->eco_numero]->info["level"] = 0 + Kernel::getLevel('BU_ECOLE', $value->eco_numero);
                 // Recherche des classes dans chaque Ècole trouvÈe
                 $classes = Kernel::getTree("BU_ECOLE", $value->eco_numero);
                 $tree->ecoles[$value->eco_numero]->classes = $classes->classes;
             }
             break;
         case "BU_ECOLE":
             // Recherche des Ècoles dans une ville...
             $cla_dao = _dao("kernel|kernel_tree_claniv");
             $cla_list = $cla_dao->getByEcole($racine_node);
             $tree->classes = array();
             foreach ($cla_list as $key => $value) {
                 $tree->classes[$value->cla_id]->info["nom"] = $value->cla_nom;
                 $tree->classes[$value->cla_id]->info["niveau"] = $value->niv_niveau;
                 $tree->classes[$value->cla_id]->info["type"] = $value->niv_type;
                 $tree->classes[$value->cla_id]->info["level"] = 0 + Kernel::getLevel('BU_CLASSE', $value->cla_id);
             }
             break;
     }
     reset($tree);
     return $tree;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:61,代码来源:kernel.class.php


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