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


PHP Kernel::PetitPoucet方法代码示例

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


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

示例1: getNode


//.........这里部分代码省略.........
             // BU_VILLE
             $petitpoucet[] = array('txt' => $infos['nom']);
             // Liste des "BU_VILLE"
             $childs = Kernel::getNodeChilds($pType, $pId);
             $childs = Kernel::filterNodeList($childs, 'USER_*');
             $droit = max($droit, Kernel::getLevel('BU_GRVILLE', $parent_grville[0]["id"]));
             $droit = max($droit, Kernel::getLevel('ROOT', 0));
             break;
         case 'BU_ECOLE':
             $infos = Kernel::getNodeInfo($pType, $pId, false);
             // Recherche des parents
             $parents = Kernel::getNodeParents($pType, $pId);
             $parent_ville = Kernel::filterNodeList($parents, 'BU_VILLE');
             $parents = Kernel::getNodeParents($parent_ville[0]["type"], $parent_ville[0]["id"]);
             $parent_grville = Kernel::filterNodeList($parents, 'BU_GRVILLE');
             // ROOT
             $petitpoucet[] = array('txt' => 'Root', 'url' => CopixUrl::get('comptes||getNode', array('type' => 'ROOT')));
             // BU_GRVILLE
             $petitpoucet[] = array('txt' => $parent_grville[0]['nom'], 'url' => CopixUrl::get('comptes||getNode', array('type' => $parent_grville[0]['type'], 'id' => $parent_grville[0]['id'])));
             // BU_VILLE
             $petitpoucet[] = array('txt' => $parent_ville[0]['nom'], 'url' => CopixUrl::get('comptes||getNode', array('type' => $parent_ville[0]['type'], 'id' => $parent_ville[0]['id'])));
             // BU_ECOLE
             $petitpoucet[] = array('txt' => $infos['nom']);
             // Liste des "BU_VILLE"
             $childs = Kernel::getNodeChilds($pType, $pId);
             $childs = Kernel::filterNodeList($childs, 'USER_*');
             $droit = max($droit, Kernel::getLevel('BU_VILLE', $parent_ville[0]["id"]));
             $droit = max($droit, Kernel::getLevel('BU_GRVILLE', $parent_grville[0]["id"]));
             $droit = max($droit, Kernel::getLevel('ROOT', 0));
             break;
         case 'BU_CLASSE':
             $infos = Kernel::getNodeInfo($pType, $pId, false);
             // Recherche des parents
             $parents = Kernel::getNodeParents($pType, $pId);
             $parent_ecole = Kernel::filterNodeList($parents, 'BU_ECOLE');
             $parents = Kernel::getNodeParents($parent_ecole[0]["type"], $parent_ecole[0]["id"]);
             $parent_ville = Kernel::filterNodeList($parents, 'BU_VILLE');
             $parents = Kernel::getNodeParents($parent_ville[0]["type"], $parent_ville[0]["id"]);
             $parent_grville = Kernel::filterNodeList($parents, 'BU_GRVILLE');
             // ROOT
             $petitpoucet[] = array('txt' => 'Root', 'url' => CopixUrl::get('comptes||getNode', array('type' => 'ROOT')));
             // BU_GRVILLE
             $petitpoucet[] = array('txt' => $parent_grville[0]['nom'], 'url' => CopixUrl::get('comptes||getNode', array('type' => $parent_grville[0]['type'], 'id' => $parent_grville[0]['id'])));
             // BU_VILLE
             $petitpoucet[] = array('txt' => $parent_ville[0]['nom'], 'url' => CopixUrl::get('comptes||getNode', array('type' => $parent_ville[0]['type'], 'id' => $parent_ville[0]['id'])));
             // BU_ECOLE
             $petitpoucet[] = array('txt' => $parent_ecole[0]['nom'], 'url' => CopixUrl::get('comptes||getNode', array('type' => $parent_ecole[0]['type'], 'id' => $parent_ecole[0]['id'])));
             // BU_CLASSE
             $petitpoucet[] = array('txt' => $infos['nom']);
             // Liste des "BU_VILLE"
             $childs = Kernel::getNodeChilds($pType, $pId);
             //print_r($childs);
             $eleves = Kernel::filterNodeList($childs, 'USER_ELE');
             foreach ($eleves as $eleve) {
                 $parents = Kernel::getNodeChilds($eleve['type'], $eleve['id']);
                 $parents = Kernel::filterNodeList($parents, 'USER_RES');
                 foreach ($parents as $parent) {
                     $childs[] = $parent;
                 }
             }
             $childs = Kernel::filterNodeList($childs, 'USER_*');
             $droit = max($droit, Kernel::getLevel('BU_ECOLE', $parent_ecole[0]["id"]));
             $droit = max($droit, Kernel::getLevel('ROOT', 0));
             break;
         default:
             return CopixActionGroup::process('genericTools|Messages::getError', array('message' => CopixI18N::get('comptes.error.badnodetype'), 'back' => CopixUrl::get('||')));
             break;
     }
     // Tri par type de noeud
     // $childs = Kernel::sortNodeList( $childs, 'type', array('USER_VIL','USER_ENS','USER_ADM','USER_ELE','USER_RES','USER_EXT') );
     $childs = Kernel::sortNodeList($childs, 'comptes');
     $childs = Kernel::uniqNodeList($childs);
     // Ajoute le type d'utilisateur en toute lettres.
     foreach ($childs as $child_key => $child_val) {
         $childs[$child_key]['type_nom'] = Kernel::Code2Name($child_val['type']);
     }
     if (isset($petitpoucet)) {
         $tplGetNode->assign('PETITPOUCET', Kernel::PetitPoucet($petitpoucet, " » "));
     }
     $tplGetNode->assign('NAVIGATION', CopixZone::process('comptes|navigation'));
     if ($droit >= 70) {
         $tplGetNode->assign('MAIN', CopixZone::process('comptes|userlist', array('childs' => $childs, 'type' => $pType, 'id' => $pId)));
     } else {
         $tplGetNode->assign('MAIN', CopixI18N::get('comptes.error.badrights'));
     }
     $result = $tplGetNode->fetch("getnode.tpl");
     $menu = array();
     $session = _sessionGet('modules|comptes|doLoginCreate|success');
     if ($session && is_array($session) && sizeof($session)) {
         $menu[] = array('txt' => CopixI18N::get('comptes.strings.showloginresult', sizeof($session)), 'url' => CopixUrl::get('comptes||getLoginResult'), 'size' => 160);
     }
     /*if( Kernel::getLevel( 'ROOT', 0 ) >= PROFILE_CCV_ADMIN ) {
           $menu[] = array( 'txt' => CopixI18N::get('comptes.strings.getext'), 'url' => CopixUrl::get ('comptes||getUserExt'), 'size'=>160 );
           $menu[] = array( 'txt' => CopixI18N::get('comptes.strings.getanim'), 'url' => CopixUrl::get ('comptes|animateurs|list'), 'size'=>120 );
       }
       if( count($menu) ) $tpl->assign ('MENU', $menu );*/
     $tpl->assign('MENU', $this->menu);
     $tpl->assign('MAIN', $result);
     return new CopixActionReturn(COPIX_AR_DISPLAY, $tpl);
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:101,代码来源:comptes.actiongroup.php

示例2: processShowNewClassroomPasswords

 /**
  * Ré-génération des mots de passe d'une classe
  */
 public function processShowNewClassroomPasswords()
 {
     $ppo = new CopixPPO();
     $ppo->nodeId = _request('nodeId', null);
     // Récupération des paramètres
     if (is_null($ppo->nodeId)) {
         return CopixActionGroup::process('generictools|Messages::getError', array('message' => "Une erreur est survenue.", 'back' => CopixUrl::get('gestionautonome||showTree')));
     }
     $classroomDAO = _ioDAO('kernel|kernel_bu_ecole_classe');
     if (!($classroom = $classroomDAO->get($ppo->nodeId))) {
         return CopixActionGroup::process('generictools|Messages::getError', array('message' => "Une erreur est survenue.", 'back' => CopixUrl::get('gestionautonome||showTree')));
     }
     // Contrôle des droits
     $ppo->hasCredentialTeacherUpdate = _currentUser()->testCredential('module:classroom|' . $ppo->nodeId . '|teacher|update@gestionautonome');
     $ppo->hasCredentialStudentUpdate = _currentUser()->testCredential('module:classroom|' . $ppo->nodeId . '|student|update@gestionautonome');
     $ppo->hasCredentialPersonInChargeUpdate = _currentUser()->testCredential('module:classroom|' . $ppo->nodeId . '|person_in_charge|update@gestionautonome');
     if (!$ppo->hasCredentialPersonInChargeUpdate && !$ppo->hasCredentialStudentUpdate && !$ppo->hasCredentialPersonInChargeUpdate) {
         throw new CopixCredentialException();
     }
     // Infos du noeud
     $nodeInfos = Kernel::getNodeInfo('BU_CLASSE', $ppo->nodeId);
     // Breadcrumbs & titre
     $breadcrumbs = Kernel::generateBreadcrumbs($nodeInfos);
     $breadcrumbs[] = array('txt' => 'Re-génération des mots de passe');
     $ppo->breadcrumbs = Kernel::PetitPoucet($breadcrumbs, ' » ');
     $ppo->TITLE_PAGE = CopixConfig::get('gestionautonome|moduleTitle');
     $ppo->title = 'Réinitialisation des mots de passe';
     $ppo->msgSuccess = 'Modification effectuée !';
     $ppo->subTitle = 'Liste des comptes modifiés';
     // Récupération des comptes modifiés
     $ppo->accounts = _sessionGet('modules|gestionautonome|createAccount');
     // Récupérations des informations des modifications apportées
     $accountsInSession = _sessionGet('modules|gestionautonome|passwordsList');
     if (!is_array($accountsInSession)) {
         $accountsInSession = array();
     } else {
         $toDisplay = array();
         foreach ($accountsInSession as $lines) {
             foreach ($lines as $data) {
                 $toDisplay[] = $data;
             }
         }
         $ppo->accountsInSession = $toDisplay;
     }
     return _arPPO($ppo, 'account_listing.tpl');
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:49,代码来源:default.actiongroup.php


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