You are here

function _draggableviews_save_hierarchy in DraggableViews 7

Same name and namespace in other branches
  1. 6.3 draggableviews.inc \_draggableviews_save_hierarchy()

Save Hierarchy

Parameters

$info: The structured information array. Look at _draggableviews_info(..) to learn more.

3 calls to _draggableviews_save_hierarchy()
draggableviews_view_draggabletable_form_submit in ./draggableviews.module
Implements hook_submit().
_draggableviews_click_sort in ./draggableviews.inc
Click Sort
_draggableviews_rebuild_hierarchy in ./draggableviews.inc
Rebuild hierarchy

File

./draggableviews.inc, line 796
Draggableviews processing functions. Rough summary of what functions in this file do:

Code

function _draggableviews_save_hierarchy($info) {

  // Loop through all nodes.
  foreach ($info['nodes'] as $nid => $prop) {
    if (isset($info['hierarchy'])) {
      $value = $prop['parent'];
      $handler = $info['hierarchy']['field']['handler'];
      $handler
        ->save($nid, $value);
    }
    $value = $prop['order'][0];
    $handler = $info['order']['field']['handler'];
    $handler
      ->save($nid, $value);
  }
}