ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilLMTree.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
12 class ilLMTree extends ilTree
13 {
14  static $instances = array();
15 
21  private function __construct($a_tree_id)
22  {
23  parent::ilTree($a_tree_id);
24  $this->setTableNames('lm_tree','lm_data');
25  $this->setTreeTablePK("lm_id");
26  $this->useCache(true);
27  }
28 
35  static function getInstance($a_tree_id)
36  {
37  if (isset(self::$instances[$a_tree_id]))
38  {
39  return self::$instances[$a_tree_id];
40  }
41  $tree = new ilLMTree($a_tree_id);
42  self::$instances[$a_tree_id] = $tree;
43 
44  return $tree;
45  }
46 
47 
52  public function isCacheUsed()
53  {
54  return $this->use_cache;
55  }
56 
57 
58 }
59 
60 ?>
isCacheUsed()
Check if cache is active.
static $instances
static getInstance($a_tree_id)
Get Instance.
__construct($a_tree_id)
Constructor.
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be &#39;obj_id&#39; You may use...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
setTreeTablePK($a_column_name)
set column containing primary key in tree table public
useCache($a_use=true)
Use Cache (usually activated)