This is compatible with eZ Publish 4.
You can remove policy checking by removing the condition with $node->canMoveFrom() && $newParentNode->canMoveTo( $classID ).
The following code is based on a part of the action view of the content module (kernel/content/action.php). The known variables are:
$object = $node->object(); $class = $object->contentClass(); $classID = $class->attribute( 'id' ); if ( !in_array( $node->attribute( 'node_id' ), $newParentNode->pathArray() ) ) { if ( $node->canMoveFrom() && $newParentNode->canMoveTo( $classID ) ) { eZContentObjectTreeNodeOperations::move( $node->attribute( 'node_id' ), $newParentNode->attribute( 'node_id' ) ); } }
Article provided by eZpedia
All text is available under the terms of the GNU Free Documentation License
Powered by eZ Publish Community Project 4.2011
Hosted by Swiss eZ Publish partner YMC