public function getExtendPaginationOptions($options = null) {
		if (empty($options) || !is_array($options)) {
			$options = [];
		}

		if (!property_exists($this->_controller, 'Paginator')) {
			throw new InternalErrorException(__d('view_extension', 'Paginator component is not loaded'));
		}

		$paginatorOptions = $this->_controller->Paginator->mergeOptions(null);
		$page = (int)Hash::get($paginatorOptions, 'page');
		if (!$this->_controller->RequestHandler->prefers('prt') || ($page > 1)) {
			return $options;
		}

		$options['limit'] = CAKE_THEME_PRINT_DATA_LIMIT;
		$options['maxLimit'] = CAKE_THEME_PRINT_DATA_LIMIT;

		return $options;
	}
public function getExtendPaginationOptions($options = null) {
		if (empty($options) || !is_array($options)) {
			$options = [];
		}

		if (!property_exists($this->_controller, 'Paginator')) {
			throw new InternalErrorException(__d('view_extension', 'Paginator component is not loaded'));
		}

		$paginatorOptions = $this->_controller->Paginator->mergeOptions(null);
		$page = (int)Hash::get($paginatorOptions, 'page');
		if (!$this->_controller->RequestHandler->prefers('prt') || ($page > 1)) {
			return $options;
		}

		$options['limit'] = CAKE_THEME_PRINT_DATA_LIMIT;
		$options['maxLimit'] = CAKE_THEME_PRINT_DATA_LIMIT;

		return $options;
	}
public function getExtendPaginationOptions ( $ options = null ) { if ( empty ( $ options ) || ! is_array ( $ options ) ) { $ options = [ ] ; } if ( ! property_exists ( $ this -> _controller , 'Paginator' ) ) { throw new InternalErrorException ( __d ( 'view_extension' , 'Paginator component is not loaded' ) ) ; } $ paginatorOptions = $ this -> _controller -> Paginator -> mergeOptions ( null ) ; $ page = ( int ) Hash :: get ( $ paginatorOptions , 'page' ) ; if ( ! $ this -> _controller -> RequestHandler -> prefers ( 'prt' ) || ( $ page > 1 ) ) { return $ options ; } $ options [ 'limit' ] = CAKE_THEME_PRINT_DATA_LIMIT ; $ options [ 'maxLimit' ] = CAKE_THEME_PRINT_DATA_LIMIT ; return $ options ; }
Return pagination options for print preview request
If request is print preview and page number equal 1 -
set new limits for pagination.

@param array $options Options for pagination component
@throws InternalErrorException if Paginator component is
not loaded.
@return array Return pagination options.
Return pagination options for print preview request If request is print preview and page number equal 1 - set new limits for pagination .