iPédiatre
 Tout Classes Fichiers Fonctions Variables
up.php
Aller à la documentation de ce fichier.
1 <?php
2 $Module = $Params['Module'];
3 $NodeID = $Params['NodeID'];
4 $UserID = $Params['UserID'];
5 
6 if ($UserID)
7  $userObject = eZUser::fetch($UserID);
8 else
9  $userObject = eZUser::currentUser();
10 
11 
12 $children = eZContentObjectTreeNode::subTreeByNodeID( array('SortBy'=>array('priority',true)),
13  $userObject->contentObject()->mainNodeID() );
14 
15 $priorityIDArray = array_map(function($n){return $n->NodeID;}, $children);
16 var_dump($priorityIDArray);
17 
18 $p= array_search($NodeID, $priorityIDArray);
19 echo $p;
20 if ($p<count($priorityIDArray)-1){
21 echo "youhou";
22  $tmp = $priorityIDArray[$p];
24  $priorityIDArray[$p+1] = $tmp;
25 }
27 
28 
29 eZContentOperationCollection::updatePriority($NodeID, $priorityArray, $priorityIDArray);
30 eZContentCacheManager::clearContentCacheIfNeeded( eZContentObjectTreeNode::fetch($NodeID)->ContentObjectID );