public function TreeHelper::getTreeFromResult in Views tree 8.2
Builds a tree from a views result.
Parameters
array $result: The views results with views_tree_main and views_tree_parent set.
Return value
\Drupal\views_tree\TreeItem A tree representation.
1 call to TreeHelper::getTreeFromResult()
- TreeHelper::buildRenderTree in src/
TreeHelper.php - Builds a render tree from an executed view.
File
- src/
TreeHelper.php, line 66
Class
- TreeHelper
- The tree helper service.
Namespace
Drupal\views_treeCode
public function getTreeFromResult(array $result) {
$groups = $this
->groupResultByParent($result);
return $this
->getTreeFromGroups($groups);
}