previousDB_NestedSet::isParent (Previous) (Next) DB_NestedSet::pickNodenext

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

DB_NestedSet::moveTree

DB_NestedSet::moveTree() – ノードの移動やコピーのラッパー

Synopsis

require_once 'DB/NestedSet.php';

int DB_NestedSet::moveTree ( int $id , $targetid , constant $pos , bool $copy = = false , int $target )

Description

This package is not documented yet.

Parameter

integer $id

移動元の ID。

$targetid

移動先の ID。

constant $pos

位置 (定数 NESE_MOVE_* を使用します)。

boolean $copy

コピーを作成するかどうか。

integer $target

ターゲット ID。

Return value

移動したノードの ID、あるいはエラー時に false を返します。

See

_moveInsideLevel

_moveRoot2Root

および _moveAcross も参照ください。

Throws

例外はスローされません。

Note

This function can not be called statically.

Example

サブブランチの取得

<?php
require_once('DB/NestedSet.php');
    
$nestedSet =& DB_NestedSet::factory('DB'$dsn$params);
    
$parent $nestedSet->createRootNode(array('name' => 'root-node'), falsetrue);
    
$parent2 $nestedSet->createSubNode($parent, array('name' => 'sub-node));
    $parent3 = $nestedSet->createSubNode($parent2, array('
name' => 'sub-node));
    
$nestedSet->createSubNode($parent3, array('name' => 'sub1'));
    
$node $nestedSet->createSubNode($parent3, array('name' => 'sub2'));
    
$nestedSet->moveTree($node$parentNESE_MOVE_AFTER);
?>
previousDB_NestedSet::isParent (Previous) (Next) DB_NestedSet::pickNodenext

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.