src/Ubiquity/controllers/admin/viewers/ModelViewer.php
protected function getDataTableInstance($instances, $model, $totalCount, $page = 1): DataTable {
		$semantic = $this->jquery->semantic ();
		$recordsPerPage = $this->recordsPerPage ( $model, $totalCount );
		if (is_numeric ( $recordsPerPage )) {
			$grpByFields = $this->getGroupByFields ();
			if (is_array ( $grpByFields )) {
				$dataTable = $semantic->dataTable ( "lv", $model, $instances );
				$dataTable->setGroupByFields ( $grpByFields );
			} else {
				$dataTable = $semantic->jsonDataTable ( "lv", $model, $instances );
			}
			$dataTable->paginate ( $page, $totalCount, $recordsPerPage, 5 );
			$dataTable->onActiveRowChange ( '$("#table-details").html("");' );
			$dataTable->onSearchTerminate ( '$("#search-query-content").html(data);$("#search-query").show();$("#table-details").html("");' );
		} else {
			$dataTable = $semantic->dataTable ( "lv", $model, $instances );
		}
		return $dataTable;
	}
protected function getDataTableInstance($instances, $model, $totalCount, $page = 1): DataTable {
		$semantic = $this->jquery->semantic ();
		$recordsPerPage = $this->recordsPerPage ( $model, $totalCount );
		if (is_numeric ( $recordsPerPage )) {
			$grpByFields = $this->getGroupByFields ();
			if (is_array ( $grpByFields )) {
				$dataTable = $semantic->dataTable ( "lv", $model, $instances );
				$dataTable->setGroupByFields ( $grpByFields );
			} else {
				$dataTable = $semantic->jsonDataTable ( "lv", $model, $instances );
			}
			$dataTable->paginate ( $page, $totalCount, $recordsPerPage, 5 );
			$dataTable->onActiveRowChange ( '$("#table-details").html("");' );
			$dataTable->onSearchTerminate ( '$("#search-query-content").html(data);$("#search-query").show();$("#table-details").html("");' );
		} else {
			$dataTable = $semantic->dataTable ( "lv", $model, $instances );
		}
		return $dataTable;
	}
protected function getDataTableInstance ( $ instances , $ model , $ totalCount , $ page = 1 ) : DataTable { $ semantic = $ this -> jquery -> semantic ( ) ; $ recordsPerPage = $ this -> recordsPerPage ( $ model , $ totalCount ) ; if ( is_numeric ( $ recordsPerPage ) ) { $ grpByFields = $ this -> getGroupByFields ( ) ; if ( is_array ( $ grpByFields ) ) { $ dataTable = $ semantic -> dataTable ( "lv" , $ model , $ instances ) ; $ dataTable -> setGroupByFields ( $ grpByFields ) ; } else { $ dataTable = $ semantic -> jsonDataTable ( "lv" , $ model , $ instances ) ; } $ dataTable -> paginate ( $ page , $ totalCount , $ recordsPerPage , 5 ) ; $ dataTable -> onActiveRowChange ( '$("#table-details").html("");' ) ; $ dataTable -> onSearchTerminate ( '$("#search-query-content").html(data);$("#search-query").show();$("#table-details").html("");' ) ; } else { $ dataTable = $ semantic -> dataTable ( "lv" , $ model , $ instances ) ; } return $ dataTable ; }
Returns the dataTable instance for dispaying a list of object

@param array $instances
@param string $model
@param number $totalCount
@param number $page
@return DataTable
Returns the dataTable instance for dispaying a list of object