Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
prototree.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Display doucment explorer
8  *
9  * @author Anakeen
10  * @version $Id: prototree.php,v 1.2 2008/06/11 16:18:24 eric Exp $
11  * @package FDL
12  * @subpackage FDL
13  */
14 /**
15  */
16 /**
17  * Add branch in folder tree
18  * @param Action &$action current action
19  * @param array $tree : tree definition
20  */
21 function prototree(&$action, $tree, $postact = array())
22 {
23  header('Content-type: text/xml; charset=utf-8');
24  $action->lay = new Layout(getLayoutFile("FDL", "prototree.xml") , $action);
25  $action->lay->setEncoding("utf-8");
26 
27  $action->lay->set("count", count($tree));
28  $action->lay->set("code", "OK");
29  $action->lay->set("warning", "");
30  $pulid = uniqid("ul");
31  foreach ($tree as $k => $v) {
32  $tree[$k]["ulid"] = $pulid . $k;
33  if (!isset($v["selecturl"])) $tree[$k]["selecturl"] = false;
34  if (!isset($v["selectjs"])) $tree[$k]["selectjs"] = false;
35  $tree[$k]["selectnone"] = !($tree[$k]["selectjs"] || $tree[$k]["selecturl"]);
36  }
37  $action->lay->setBlockData("TREE", $tree);
38  $action->lay->setBlockData("ACTIONS", $postact);
39 }
40 ?>
Layout is a template generator.
global $action
prototree(&$action, $tree, $postact=array())
Definition: prototree.php:21
getLayoutFile($app, $layfile)
Definition: Lib.Common.php:258
← centre documentaire © anakeen