public function validateTree()
    {
        if (!$this->showTree) {
            return;
        }

        $this->showSorting = $this->showPagination = false;

        if (!$this->model->methodExists('getChildren')) {
            throw new ApplicationException(
                'To display list as a tree, the specified model must have a method "getChildren"'
            );
        }

        if (!$this->model->methodExists('getChildCount')) {
            throw new ApplicationException(
                'To display list as a tree, the specified model must have a method "getChildCount"'
            );
        }
    }
public function validateTree()
    {
        if (!$this->showTree) {
            return;
        }

        $this->showSorting = $this->showPagination = false;

        if (!$this->model->methodExists('getChildren')) {
            throw new ApplicationException(
                'To display list as a tree, the specified model must have a method "getChildren"'
            );
        }

        if (!$this->model->methodExists('getChildCount')) {
            throw new ApplicationException(
                'To display list as a tree, the specified model must have a method "getChildCount"'
            );
        }
    }
public function validateTree ( ) { if ( ! $ this -> showTree ) { return ; } $ this -> showSorting = $ this -> showPagination = false ; if ( ! $ this -> model -> methodExists ( 'getChildren' ) ) { throw new ApplicationException ( 'To display list as a tree, the specified model must have a method "getChildren"' ) ; } if ( ! $ this -> model -> methodExists ( 'getChildCount' ) ) { throw new ApplicationException ( 'To display list as a tree, the specified model must have a method "getChildCount"' ) ; } }
Validates the model and settings if showTree is used
@return void
Validates the model and settings if showTree is used