18 declare(strict_types=1);
36 $query =
'INSERT INTO ecs_cms_tree ' .
37 '(tree,child,parent,lft,rgt,depth) ' .
39 $this->db->quote($tree,
'integer') .
', ' .
40 $this->db->quote($a_child,
'integer') .
', ' .
41 $this->db->quote(0,
'integer') .
', ' .
42 $this->db->quote(1,
'integer') .
', ' .
43 $this->db->quote(100,
'integer') .
', ' .
44 $this->db->quote(1,
'integer') .
' )';
46 $this->db->manipulate(
$query);
60 $DIC->logger()->wsrv()->debug(
'Deleting cms tree: ' . $a_tree_id);
61 $query =
'DELETE FROM ecs_cms_tree ' .
62 'WHERE tree = ' .
$ilDB->quote($a_tree_id,
'integer');
72 $query =
'SELECT COUNT(*) num FROM ecs_cms_tree WHERE tree = ' . $this->db->quote($a_tree_id,
'integer');
90 $query =
'SELECT child FROM ecs_cms_tree WHERE tree = ' .
$ilDB->quote($a_tree_id,
'integer');
93 return (
int) $row->child;
setObjectTablePK(string $a_column_name)
set column containing primary key in object table
static lookupRootId($a_tree_id)
lookup root id
useCache(bool $a_use=true)
Use Cache (usually activated)
treeExists(int $a_tree_id)
Check if tree exists.
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...
static deleteByTreeId(int $a_tree_id)
Delete tree by tree_id.
__construct(Container $dic, ilPlugin $plugin)
insertRootNode(int $tree, int $a_child)
__construct(int $a_tree_id)