You are here

public function draggableviews_hierarchy_handler_native::get in DraggableViews 7.2

Get the parent value.

Parameters

object $field: Draggableviews field handler. View is $field->view, to get a row $field->view->result[$index].

int $index: Index of the row.

Return value

int Weight value.

Overrides draggableviews_hierarchy_handler::get

File

handlers/draggableviews_hierarchy_handler_native.inc, line 16

Class

draggableviews_hierarchy_handler_native

Code

public function get($field, $index) {
  $row = $field->view->result[$index];
  return isset($row->draggableviews_structure_parent) ? $row->draggableviews_structure_parent : 0;
}