ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
MediaPoolTree.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 public function __construct(int $mep_obj_id)
26 {
27 parent::__construct($mep_obj_id);
28 $this->setTreeTablePK("mep_id");
29 $this->setTableNames("mep_tree", "mep_item");
30 }
31
32 public function insertInMepTree(
33 int $a_obj_id,
34 ?int $a_parent = null
35 ): void {
36 if (!$this->isInTree($a_obj_id)) {
37 $parent = (is_null($a_parent))
38 ? $this->getRootId()
39 : $a_parent;
40 $this->insertNode($a_obj_id, $parent);
41 }
42 }
43
44}
insertInMepTree(int $a_obj_id, ?int $a_parent=null)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
isInTree(?int $a_node_id)
get all information of a node.
insertNode(int $a_node_id, int $a_parent_id, int $a_pos=self::POS_LAST_NODE, bool $a_reset_deletion_date=false)
insert new node with node_id under parent node with parent_id
setTreeTablePK(string $a_column_name)
set column containing primary key in tree table
setTableNames(string $a_table_tree, string $a_table_obj_data, string $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be 'obj_id' You may use...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(!file_exists('../ilias.ini.php'))