You are here

function _taxonomy_edge_move_subtree in Taxonomy Edge 8

Same name and namespace in other branches
  1. 6 taxonomy_edge.module \_taxonomy_edge_move_subtree()
  2. 7.2 taxonomy_edge.module \_taxonomy_edge_move_subtree()
  3. 7 taxonomy_edge.module \_taxonomy_edge_move_subtree()

Detach path and children from current parent and attach to new parents

Parameters

$vid: Vocabulary ID

$tid: Term ID

$parents: Term ID of new parents

1 call to _taxonomy_edge_move_subtree()
_taxonomy_edge_taxonomy_term_update in ./taxonomy_edge.module
Update a term in the edge tree.

File

./taxonomy_edge.module, line 519
Selecting all children of a given taxonomy term can be a pain. This module makes it easier to do this, by maintaining a complete list of edges for each term using the adjecency matrix graph theory.

Code

function _taxonomy_edge_move_subtree($vid, $tid, $parents) {
  _taxonomy_edge_detach_subtree($vid, array(
    $tid,
  ));
  _taxonomy_edge_attach_subtree($vid, $tid, $parents);
}