[ Index ]

PHP Cross Reference of phpBB-3.3.11-deutsch

title

Body

[close]

/phpbb/tree/ -> tree_interface.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 120 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

tree_interface:: (10 methods):
  insert()
  delete()
  move()
  move_down()
  move_up()
  move_children()
  change_parent()
  get_path_and_subtree_data()
  get_path_data()
  get_subtree_data()


Interface: tree_interface  - X-Ref

insert(array $additional_data)   X-Ref
Inserts an item into the database table and into the tree.

return: array Array with item data as set in the database
param: array    $additional_data    The item to be added

delete($item_id)   X-Ref
Delete an item from the tree and from the database table

Also deletes the subtree from the tree and from the database table

return: array        Item ids that have been deleted
param: int    $item_id    The item to be deleted

move($item_id, $delta)   X-Ref
Move an item by a given delta

An item is only moved up/down within the same parent. If the delta is
larger then the number of children, the item is moved to the top/bottom
of the list of children within this parent.

return: bool True if the item was moved
param: int    $item_id    The item to be moved
param: int    $delta        Number of steps to move this item, < 0 => down, > 0 => up

move_down($item_id)   X-Ref
Move an item down by 1

return: bool True if the item was moved
param: int    $item_id    The item to be moved

move_up($item_id)   X-Ref
Move an item up by 1

return: bool True if the item was moved
param: int    $item_id    The item to be moved

move_children($current_parent_id, $new_parent_id)   X-Ref
Moves all children of one item to another item

If the new parent already has children, the new children are appended
to the list.

return: bool True if any items where moved
param: int    $current_parent_id    The current parent item
param: int    $new_parent_id        The new parent item

change_parent($item_id, $new_parent_id)   X-Ref
Change parent item

Moves the item to the bottom of the new \parent's list of children

return: bool True if the parent was set successfully
param: int    $item_id            The item to be moved
param: int    $new_parent_id        The new parent item

get_path_and_subtree_data($item_id, $order_asc, $include_item)   X-Ref
Get all items that are either ancestors or descendants of the item

return: array            Array of items (containing all columns from the item table)
param: int        $item_id        Id of the item to retrieve the ancestors/descendants from
param: bool        $order_asc        Order the items ascendingly (most outer ancestor first)
param: bool        $include_item    Should the item matching the given item id be included in the list as well

get_path_data($item_id, $order_asc, $include_item)   X-Ref
Get all of the item's ancestors

return: array            Array of items (containing all columns from the item table)
param: int        $item_id        Id of the item to retrieve the ancestors from
param: bool        $order_asc        Order the items ascendingly (most outer ancestor first)
param: bool        $include_item    Should the item matching the given item id be included in the list as well

get_subtree_data($item_id, $order_asc, $include_item)   X-Ref
Get all of the item's descendants

return: array            Array of items (containing all columns from the item table)
param: int        $item_id        Id of the item to retrieve the descendants from
param: bool        $order_asc        Order the items ascendingly
param: bool        $include_item    Should the item matching the given item id be included in the list as well



Generated: Sat Nov 4 14:26:03 2023 Cross-referenced by PHPXref 0.7.1