From 71af2ee0e89977e2fbb5acc263c172e812b0f15c Mon Sep 17 00:00:00 2001 From: Adrien Date: Tue, 20 Jun 2017 09:49:00 +0200 Subject: [PATCH] FR - Update pagination.rst https://github.com/cakephp/docs/issues/4632 https://github.com/cakephp/docs/commit/f6ac810cb21c8f530bf8eaecc8ae32c7ba2ce720 --- fr/controllers/components/pagination.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fr/controllers/components/pagination.rst b/fr/controllers/components/pagination.rst index 68d74b1e50..4a4b6aa8bb 100644 --- a/fr/controllers/components/pagination.rst +++ b/fr/controllers/components/pagination.rst @@ -198,8 +198,14 @@ Requêtes de Paginating Multiple =============================== Vous pouvez paginer plusieurs models dans une unique action de controller en -utilisant l'option ``scope``:: +utilisant l'option ``scope`` à la fois dans la propriété $paginate du controller et à l'appel de la méthode paginate(): + // Par la propriété $paginate du controller + public $paginate = [ + 'Articles' => ['scope' => 'article'], + 'Tags' => ['scope' => 'tag'] + ]; + // Dans une action de controller $articles = $this->paginate($this->Articles, ['scope' => 'article']); $tags = $this->paginate($this->Tags, ['scope' => 'tag']);