common/utilities/CodeGenUtil.php
public static function getPaginationDetail( $dataProvider ) {

		$total			= $dataProvider->getTotalCount();
		$pagination		= $dataProvider->getPagination();
		$current_page	= $pagination->getPage();
		$page_size		= $pagination->getPageSize();
		$start			= $page_size * $current_page;
		$end			= $page_size * ( $current_page + 1 ) - 1;
		$currentSize	= count( $dataProvider->getModels() );
		$currentDisplay	= $end - $start;

		if( $currentSize < $currentDisplay ) {

			$end	= $start + $currentSize;
		}

		if( $end > 0 ) {

			$start += 1;
		}

		if( $currentSize == $page_size ) {

			$end	+= 1;
		}

		return "Showing $start to $end out of $total entries";
	}
public static function getPaginationDetail( $dataProvider ) {

		$total			= $dataProvider->getTotalCount();
		$pagination		= $dataProvider->getPagination();
		$current_page	= $pagination->getPage();
		$page_size		= $pagination->getPageSize();
		$start			= $page_size * $current_page;
		$end			= $page_size * ( $current_page + 1 ) - 1;
		$currentSize	= count( $dataProvider->getModels() );
		$currentDisplay	= $end - $start;

		if( $currentSize < $currentDisplay ) {

			$end	= $start + $currentSize;
		}

		if( $end > 0 ) {

			$start += 1;
		}

		if( $currentSize == $page_size ) {

			$end	+= 1;
		}

		return "Showing $start to $end out of $total entries";
	}
public static function getPaginationDetail ( $ dataProvider ) { $ total = $ dataProvider -> getTotalCount ( ) ; $ pagination = $ dataProvider -> getPagination ( ) ; $ current_page = $ pagination -> getPage ( ) ; $ page_size = $ pagination -> getPageSize ( ) ; $ start = $ page_size * $ current_page ; $ end = $ page_size * ( $ current_page + 1 ) - 1 ; $ currentSize = count ( $ dataProvider -> getModels ( ) ) ; $ currentDisplay = $ end - $ start ; if ( $ currentSize < $ currentDisplay ) { $ end = $ start + $ currentSize ; } if ( $ end > 0 ) { $ start += 1 ; } if ( $ currentSize == $ page_size ) { $ end += 1 ; } return "Showing $start to $end out of $total entries" ; }
Return pagination info to be displayed on data grid footer or header.
@return string - pagination info
Return pagination info to be displayed on data grid footer or header .