@@ -468,16 +468,29 @@ public function sort($key, $title = null, array $options = [])
468
468
/**
469
469
* Merges passed URL options with current pagination state to generate a pagination URL.
470
470
*
471
+ * ### Options:
472
+ *
473
+ * - `escape`: If false, the URL will be returned unescaped, do only use if it is manually
474
+ * escaped afterwards before being displayed.
475
+ * - `fullBase`: If true, the full base URL will be prepended to the result
476
+ *
471
477
* @param array $options Pagination/URL options array
472
478
* @param string|null $model Which model to paginate on
473
- * @param bool $full If true, the full base URL will be prepended to the result
479
+ * @param bool $full If true, the full base URL will be prepended to the result @deprecated Use $options and `fullBase`.
474
480
* @return string By default, returns a full pagination URL string for use in non-standard contexts (i.e. JavaScript)
475
481
* @link http://book.cakephp.org/3.0/en/views/helpers/paginator.html#generating-pagination-urls
476
482
*/
477
483
public function generateUrl (array $ options = [], $ model = null , $ full = false )
478
484
{
479
485
$ paging = $ this ->params ($ model );
480
486
$ paging += ['page ' => null , 'sort ' => null , 'direction ' => null , 'limit ' => null ];
487
+
488
+ $ defaults = [
489
+ 'escape ' => true ,
490
+ 'fullBase ' => $ full
491
+ ];
492
+ $ options += $ defaults ;
493
+
481
494
$ url = [
482
495
'page ' => $ paging ['page ' ],
483
496
'limit ' => $ paging ['limit ' ],
@@ -518,7 +531,7 @@ public function generateUrl(array $options = [], $model = null, $full = false)
518
531
}
519
532
}
520
533
521
- return $ this ->Url ->build ($ url , $ full );
534
+ return $ this ->Url ->build ($ url , $ options );
522
535
}
523
536
524
537
/**
0 commit comments