protected function getListViewData($start = null, $rowPerPage = null, $keyword = null, $sortField = null, $sortOrder = null) {
        $list = [];

        if ($this->listViewDataClosure != null) {
            $c = $this->listViewDataClosure;
            $list = $c($start, $rowPerPage, $keyword, $sortField, $sortOrder);

        } elseif ($keyword != null && trim($keyword) != "" && $this->searchClosure != null) {         // For Custom Searching
            $c = $this->searchClosure;
            $list = $c($start, $rowPerPage, $keyword, $sortField, $sortOrder);

        } else {
            $this->beforeGetListViewData(function ($tableName, $findClause, $limit, $bindingData) use (&$list) {

                // For RedBean Case
                $list = R::find($tableName, $findClause . $limit, $bindingData);

            }, function ($sql, $limit, $bindingData) use (&$list) {

                // For SQL Case
                $list = R::getAll($sql . $limit, $bindingData);

                try {
                    $list = R::convertToBeans($this->tableName, $list);
                } catch (\Exception $ex) {

                }

            }, $start, $rowPerPage, $keyword, $sortField, $sortOrder);
        }

        return $list;
    }
protected function getListViewData($start = null, $rowPerPage = null, $keyword = null, $sortField = null, $sortOrder = null) {
        $list = [];

        if ($this->listViewDataClosure != null) {
            $c = $this->listViewDataClosure;
            $list = $c($start, $rowPerPage, $keyword, $sortField, $sortOrder);

        } elseif ($keyword != null && trim($keyword) != "" && $this->searchClosure != null) {         // For Custom Searching
            $c = $this->searchClosure;
            $list = $c($start, $rowPerPage, $keyword, $sortField, $sortOrder);

        } else {
            $this->beforeGetListViewData(function ($tableName, $findClause, $limit, $bindingData) use (&$list) {

                // For RedBean Case
                $list = R::find($tableName, $findClause . $limit, $bindingData);

            }, function ($sql, $limit, $bindingData) use (&$list) {

                // For SQL Case
                $list = R::getAll($sql . $limit, $bindingData);

                try {
                    $list = R::convertToBeans($this->tableName, $list);
                } catch (\Exception $ex) {

                }

            }, $start, $rowPerPage, $keyword, $sortField, $sortOrder);
        }

        return $list;
    }
protected function getListViewData ( $ start = null , $ rowPerPage = null , $ keyword = null , $ sortField = null , $ sortOrder = null ) { $ list = [ ] ; if ( $ this -> listViewDataClosure != null ) { $ c = $ this -> listViewDataClosure ; $ list = $ c ( $ start , $ rowPerPage , $ keyword , $ sortField , $ sortOrder ) ; } elseif ( $ keyword != null && trim ( $ keyword ) != "" && $ this -> searchClosure != null ) { // For Custom Searching $ c = $ this -> searchClosure ; $ list = $ c ( $ start , $ rowPerPage , $ keyword , $ sortField , $ sortOrder ) ; } else { $ this -> beforeGetListViewData ( function ( $ tableName , $ findClause , $ limit , $ bindingData ) use ( & $ list ) { // For RedBean Case $ list = R :: find ( $ tableName , $ findClause . $ limit , $ bindingData ) ; } , function ( $ sql , $ limit , $ bindingData ) use ( & $ list ) { // For SQL Case $ list = R :: getAll ( $ sql . $ limit , $ bindingData ) ; try { $ list = R :: convertToBeans ( $ this -> tableName , $ list ) ; } catch ( \ Exception $ ex ) { } } , $ start , $ rowPerPage , $ keyword , $ sortField , $ sortOrder ) ; } return $ list ; }
Get List view data

@param int $start
@param int $rowPerPage
@param string $keyword
@param string $sortField
@param string $sortOrder ASC/DESC
@return array List of beans
@throws \RedBeanPHP\RedException\SQL
Get List view data