class draggableviews_hierarchy_handler_native in DraggableViews 7.2
Hierarchy
Expanded class hierarchy of draggableviews_hierarchy_handler_native
2 string references to 'draggableviews_hierarchy_handler_native'
- draggableviews_hierarchy_handler_native.inc in handlers/
draggableviews_hierarchy_handler_native.inc - draggableviews_join_handler::build_join in views/
draggableviews_join_handler.inc - Build the SQL for the join this object represents.
File
- handlers/
draggableviews_hierarchy_handler_native.inc, line 15
View source
class draggableviews_hierarchy_handler_native extends draggableviews_hierarchy_handler {
public function get($field, $index) {
$row = $field->view->result[$index];
return isset($row->draggableviews_structure_parent) ? $row->draggableviews_structure_parent : 0;
}
public function get_depth($field, $index) {
// $index can be NULL for multiple reasons. Common problem
// is after parent is deleted.
if (!isset($index) || !isset($field->view->result[$index])) {
return;
}
$row = $field->view->result[$index];
// If parent is available, set parent's depth +1.
return !empty($row->draggableviews_structure_parent) ? $this
->get_depth($field, $this
->get_index($field->view, $row->draggableviews_structure_parent)) + 1 : 0;
}
// Don't need to set value here as it is done in "weight" handler
// draggableviews_handler in order to avoid doing multiple identical queries
// to draggableviews_structure table.
function set($form_state) {
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
draggableviews_hierarchy_handler:: |
public | function | Get "results" array index of and item with specific base field id. | |
draggableviews_hierarchy_handler:: |
public | function | Form with settings of the handler. | |
draggableviews_hierarchy_handler:: |
public | function | Settings form default values. | |
draggableviews_hierarchy_handler_native:: |
public | function |
Get the parent value. Overrides draggableviews_hierarchy_handler:: |
|
draggableviews_hierarchy_handler_native:: |
public | function | ||
draggableviews_hierarchy_handler_native:: |
function |
Save parent value. Overrides draggableviews_hierarchy_handler:: |