From 8ec44678097cf81ca7c1511943d1b1a498a1e8a0 Mon Sep 17 00:00:00 2001 From: Mike Fellows Date: Sat, 22 Apr 2017 19:34:17 -0700 Subject: [PATCH] Fix description of findTagged function in bookmarks tutorial. - The function has been changed several times without adjusting the descriptive paragraph. - Fixed now in English and French. --- en/tutorials-and-examples/bookmarks/intro.rst | 11 +++++------ fr/tutorials-and-examples/bookmarks/intro.rst | 12 +++++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/en/tutorials-and-examples/bookmarks/intro.rst b/en/tutorials-and-examples/bookmarks/intro.rst index 7f14c6dd48..f6caa9b4f5 100644 --- a/en/tutorials-and-examples/bookmarks/intro.rst +++ b/en/tutorials-and-examples/bookmarks/intro.rst @@ -379,12 +379,11 @@ a very powerful concept in CakePHP that allows you to package up re-usable queries. Finder methods always get a :doc:`/orm/query-builder` object and an array of options as parameters. Finders can manipulate the query and add any required conditions or criteria. When complete, finder methods must return -a modified query object. In our finder we've leveraged the ``distinct()`` and -``matching()`` methods which allow us to find distinct bookmarks that have -a 'matching' tag. The ``matching()`` method accepts an `anonymous function -`_ that receives a query -builder as its argument. Inside the callback we use the query builder to define -conditions that will filter bookmarks that have specific tags. +a modified query object. In our finder we've leveraged the ``innerJoinWith()``, +``where()`` and ``group()`` methods which allow us to find distinct bookmarks +that have a matching tag. When no tags are provided we use a +``leftJoinWith()`` and modify the 'where' condition, finding bookmarks without +tags. Creating the View ----------------- diff --git a/fr/tutorials-and-examples/bookmarks/intro.rst b/fr/tutorials-and-examples/bookmarks/intro.rst index 0f6f97b4f8..e383efc7a5 100644 --- a/fr/tutorials-and-examples/bookmarks/intro.rst +++ b/fr/tutorials-and-examples/bookmarks/intro.rst @@ -401,13 +401,11 @@ réutilisable de vos requêtes. Les finders attendent toujours un objet :doc:`/orm/query-builder` et un tableau d'options en paramètre. Les finders peuvent manipuler les requêtes et ajouter n'importe quels conditions ou critères. Une fois qu'ils ont terminé, les finders doivent retourner l'objet -Query modifié. Dans notre finder nous avons amené la méthode ``matching()`` qui -nous permet de trouver les bookmarks qui ont un tag qui 'match'. La méthode -``matching()`` accepte `une fonction anonyme -`_ qui reçoit un constructeur -de requête comme argument. Dans le callback, nous utilisons le constructeur de -requête pour définir de nouvelles conditions qui permettront de filtrer les -bookmarks ayant les tags spécfiques. +Query modifié. Dans notre finder nous avons amené les méthodes +``innerJoinWith()``, ``where()`` et ``group()`` qui nous permet de trouver les +bookmarks distinct qui ont un tag correspondante. Lorsque aucune tag n'est +fournie, nous utilisons un ``leftJoinWith()`` et modifions la condition +'where', en trouvant des bookmarks sans tags. Créer la Vue ------------