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


PHP Album::tree2commands方法代码示例

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


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

示例1: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $dossiers_tree = $this->getParam('tree');
     $dossiers_commands = Album::tree2commands($dossiers_tree);
     $dossiers_tree_move = Album::tree2move($dossiers_tree, $this->getParam('dossier_id'));
     $dossiers_commands_move = Album::tree2commands($dossiers_tree_move);
     //Kernel::MyDebug( $dossiers_commands_move );
     $tpl->assign('album_id', $this->getParam('album_id'));
     $tpl->assign('dossier_id', $this->getParam('dossier_id'));
     $tpl->assign('dossier', $this->getParam('dossier'));
     $tpl->assign('commands', $dossiers_commands);
     $tpl->assign('commands_move', $dossiers_commands_move);
     $tpl->assign('dossiermenu', $this->getParam('dossiermenu'));
     switch ($this->getParam('mode')) {
         case 'htmllist':
             $toReturn = $tpl->fetch('dossierstree_htmllist.tpl');
             break;
         case 'combo':
         default:
             $toReturn = $tpl->fetch('dossierstree_combo.tpl');
             break;
     }
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:25,代码来源:dossierstree.zone.php

示例2: _createContent

 public function _createContent(&$toReturn)
 {
     $tpl = new CopixTpl();
     $pAlbumId = $this->getParam('album_id');
     $pDossierId = $this->getParam('dossier_id');
     // $album_dao = _dao("album");
     $dossier_dao = _dao("dossier");
     $photo_dao = _dao("photo");
     if ($pDossierId > 0) {
         $dossier = $dossier_dao->get($pDossierId);
     } else {
         $dossier->dossier_id = 0;
         $dossier->dossier_album = $this->getParam('album_id');
         $dossier->dossier_parent = -1;
         $dossier->dossier_nom = CopixI18N::get('album|album.message.topfolder');
         $dossier->dossier_comment = "";
         $dossier->album_id = $pAlbumId;
     }
     if ($dossier->dossier_album != $pAlbumId) {
         return false;
     }
     $pictures = $photo_dao->findAllByAlbumAndFolder($pAlbumId, $pDossierId);
     $tpl->assign('album_id', $pAlbumId);
     $tpl->assign('dossier_id', $pDossierId);
     $tpl->assign('dossier', $dossier);
     $tpl->assign('pictures', $pictures);
     $tpl->assign('picture_thumbsize', '_s64');
     $dossiers_tree = Album::getFoldersTree($pAlbumId);
     $dossiers_commands = Album::tree2commands($dossiers_tree);
     $tpl->assign('commands_move', $dossiers_commands);
     $toReturn = $tpl->fetch('editphotos.tpl');
     return true;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:33,代码来源:editphotos.zone.php

示例3: tree2commands

 public function tree2commands($dossiers_tree)
 {
     $cmds = array();
     //var_dump($dossiers_tree);
     if (count($dossiers_tree)) {
         // $cmds[] = array( 'type'=>'open' );
         foreach ($dossiers_tree as $key => $val) {
             $childs = isset($val->childs) ? $val->childs : array();
             unset($val->childs);
             $cmds[] = array('type' => 'folder', 'data' => $val);
             $childs_cmds = Album::tree2commands($childs);
             if (count($childs_cmds)) {
                 $cmds[] = array('type' => 'open');
                 $cmds = array_merge($cmds, $childs_cmds);
                 $cmds[] = array('type' => 'close');
             }
         }
         // $cmds[] = array( 'type'=>'close' );
     }
     //var_dump($cmds);
     return $cmds;
 }
开发者ID:JVS-IS,项目名称:ICONITO-EcoleNumerique,代码行数:22,代码来源:album.class.php


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