Skip to content
Permalink
Browse files

Use 3rd param instead.

  • Loading branch information...
dereuromark committed Oct 4, 2016
1 parent 51b1415 commit f4179e3b2db4b3351a8acd0f18007571e385994e
Showing with 9 additions and 7 deletions.
  1. +9 −7 src/View/Helper/PaginatorHelper.php
@@ -468,28 +468,30 @@ public function sort($key, $title = null, array $options = [])
/**
* Merges passed URL options with current pagination state to generate a pagination URL.
*
* ### Options:
* ### Url options:
*
* - `escape`: If false, the URL will be returned unescaped, do only use if it is manually
* escaped afterwards before being displayed.
* - `fullBase`: If true, the full base URL will be prepended to the result
*
* @param array $options Pagination/URL options array
* @param string|null $model Which model to paginate on
* @param bool $full If true, the full base URL will be prepended to the result @deprecated Use $options and `fullBase`.
* @param array|bool $urlOptions Array of options or bool `fullBase` for BC reasons.
* @return string By default, returns a full pagination URL string for use in non-standard contexts (i.e. JavaScript)
* @link http://book.cakephp.org/3.0/en/views/helpers/paginator.html#generating-pagination-urls
*/
public function generateUrl(array $options = [], $model = null, $full = false)
public function generateUrl(array $options = [], $model = null, $urlOptions = false)
{
$paging = $this->params($model);
$paging += ['page' => null, 'sort' => null, 'direction' => null, 'limit' => null];
$defaults = [
if (!is_array($urlOptions)) {
$urlOptions = ['fullBase' => $urlOptions];
}
$urlOptions += [
'escape' => true,
'fullBase' => $full
'fullBase' => false
];
$options += $defaults;
$url = [
'page' => $paging['page'],
@@ -531,7 +533,7 @@ public function generateUrl(array $options = [], $model = null, $full = false)
}
}
return $this->Url->build($url, $options);
return $this->Url->build($url, $urlOptions);
}
/**

0 comments on commit f4179e3

Please sign in to comment.
You can’t perform that action at this time.