public function setTreeView($get_children_callback, $tree_view_has_children_column = 'has_children')
	{
		if (!is_callable($get_children_callback)) {
			throw new DataGridException(
				'Parameters to method DataGrid::setTreeView must be of type callable'
			);
		}

		if (is_callable($tree_view_has_children_column)) {
			$this->tree_view_has_children_callback = $tree_view_has_children_column;
			$tree_view_has_children_column = null;
		}

		$this->tree_view_children_callback = $get_children_callback;
		$this->tree_view_has_children_column = $tree_view_has_children_column;

		/**
		 * TUrn off pagination
		 */
		$this->setPagination(false);

		/**
		 * Set tree view template file
		 */
		if (!$this->template_file) {
			$this->setTemplateFile(__DIR__ . '/templates/datagrid_tree.latte');
		}

		return $this;
	}
public function setTreeView($get_children_callback, $tree_view_has_children_column = 'has_children')
	{
		if (!is_callable($get_children_callback)) {
			throw new DataGridException(
				'Parameters to method DataGrid::setTreeView must be of type callable'
			);
		}

		if (is_callable($tree_view_has_children_column)) {
			$this->tree_view_has_children_callback = $tree_view_has_children_column;
			$tree_view_has_children_column = null;
		}

		$this->tree_view_children_callback = $get_children_callback;
		$this->tree_view_has_children_column = $tree_view_has_children_column;

		/**
		 * TUrn off pagination
		 */
		$this->setPagination(false);

		/**
		 * Set tree view template file
		 */
		if (!$this->template_file) {
			$this->setTemplateFile(__DIR__ . '/templates/datagrid_tree.latte');
		}

		return $this;
	}
public function setTreeView ( $ get_children_callback , $ tree_view_has_children_column = 'has_children' ) { if ( ! is_callable ( $ get_children_callback ) ) { throw new DataGridException ( 'Parameters to method DataGrid::setTreeView must be of type callable' ) ; } if ( is_callable ( $ tree_view_has_children_column ) ) { $ this -> tree_view_has_children_callback = $ tree_view_has_children_column ; $ tree_view_has_children_column = null ; } $ this -> tree_view_children_callback = $ get_children_callback ; $ this -> tree_view_has_children_column = $ tree_view_has_children_column ; /**
		 * TUrn off pagination
		 */ $ this -> setPagination ( false ) ; /**
		 * Set tree view template file
		 */ if ( ! $ this -> template_file ) { $ this -> setTemplateFile ( __DIR__ . '/templates/datagrid_tree.latte' ) ; } return $ this ; }
Setting tree view
@param callable $get_children_callback
@param string|callable $tree_view_has_children_column
@return static
Setting tree view