Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions en/tutorials-and-examples/bookmarks/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,13 @@ method has not been implemented yet, so let's do that. In
->select(['id', 'url', 'title', 'description']);

if (empty($options['tags'])) {
$bookmarks->leftJoinWith('Tags', function ($q) {
return $q->where(['Tags.title IS ' => null]);
});
$bookmarks
->leftJoinWith('Tags')
->where(['Tags.title IS' => null]);
} else {
$bookmarks->innerJoinWith('Tags', function ($q) use ($options) {
return $q->where(['Tags.title IN' => $options['tags']]);
});
$bookmarks
->innerJoinWith('Tags')
->where(['Tags.title IN ' => $options['tags']]);
}

return $bookmarks->group(['Bookmarks.id']);
Expand Down
12 changes: 6 additions & 6 deletions es/tutorials-and-examples/bookmarks/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,13 @@ En **src/Model/Table/BookmarksTable.php** añade lo siguiente::
->select(['id', 'url', 'title', 'description']);

if (empty($options['tags'])) {
$bookmarks->leftJoinWith('Tags', function ($q) {
return $q->where(['Tags.title IS ' => null]);
});
$bookmarks
->leftJoinWith('Tags')
->where(['Tags.title IS' => null]);
} else {
$bookmarks->innerJoinWith('Tags', function ($q) use ($options) {
return $q->where(['Tags.title IN' => $options['tags']]);
});
$bookmarks
->innerJoinWith('Tags')
->where(['Tags.title IN ' => $options['tags']]);
}

return $bookmarks->group(['Bookmarks.id']);
Expand Down
12 changes: 6 additions & 6 deletions fr/tutorials-and-examples/bookmarks/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,13 @@ Dans **src/Model/Table/BookmarksTable.php** ajoutez ce qui suit::
->select(['id', 'url', 'title', 'description']);

if (empty($options['tags'])) {
$bookmarks->leftJoinWith('Tags', function ($q) {
return $q->where(['Tags.title IS ' => null]);
});
$bookmarks
->leftJoinWith('Tags')
->where(['Tags.title IS' => null]);
} else {
$bookmarks->innerJoinWith('Tags', function ($q) use ($options) {
return $q->where(['Tags.title IN' => $options['tags']]);
});
$bookmarks
->innerJoinWith('Tags')
->where(['Tags.title IN ' => $options['tags']]);
}

return $bookmarks->group(['Bookmarks.id']);
Expand Down
12 changes: 6 additions & 6 deletions ja/tutorials-and-examples/bookmarks/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,13 @@ CakePHP では、コントローラのアクションをスリムに保ち、ア
->select(['id', 'url', 'title', 'description']);

if (empty($options['tags'])) {
$bookmarks->leftJoinWith('Tags', function ($q) {
return $q->where(['Tags.title IS ' => null]);
});
$bookmarks
->leftJoinWith('Tags')
->where(['Tags.title IS' => null]);
} else {
$bookmarks->innerJoinWith('Tags', function ($q) use ($options) {
return $q->where(['Tags.title IN' => $options['tags']]);
});
$bookmarks
->innerJoinWith('Tags')
->where(['Tags.title IN ' => $options['tags']]);
}

return $bookmarks->group(['Bookmarks.id']);
Expand Down
12 changes: 6 additions & 6 deletions pt/tutorials-and-examples/bookmarks/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ método ``findTagged`` não estar implementado ainda, então vamos fazer isso. E
->select(['id', 'url', 'title', 'description']);

if (empty($options['tags'])) {
$bookmarks->leftJoinWith('Tags', function ($q) {
return $q->where(['Tags.title IS ' => null]);
});
$bookmarks
->leftJoinWith('Tags')
->where(['Tags.title IS' => null]);
} else {
$bookmarks->innerJoinWith('Tags', function ($q) use ($options) {
return $q->where(['Tags.title IN' => $options['tags']]);
});
$bookmarks
->innerJoinWith('Tags')
->where(['Tags.title IN ' => $options['tags']]);
}

return $bookmarks->group(['Bookmarks.id']);
Expand Down
12 changes: 6 additions & 6 deletions ru/tutorials-and-examples/bookmarks/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ CakePHP мы разделяем методы, оперирующие с колл
->select(['id', 'url', 'title', 'description']);

if (empty($options['tags'])) {
$bookmarks->leftJoinWith('Tags', function ($q) {
return $q->where(['Tags.title IS ' => null]);
});
$bookmarks
->leftJoinWith('Tags')
->where(['Tags.title IS' => null]);
} else {
$bookmarks->innerJoinWith('Tags', function ($q) use ($options) {
return $q->where(['Tags.title IN' => $options['tags']]);
});
$bookmarks
->innerJoinWith('Tags')
->where(['Tags.title IN ' => $options['tags']]);
}

return $bookmarks->group(['Bookmarks.id']);
Expand Down
22 changes: 14 additions & 8 deletions tr/tutorials-and-examples/bookmarks/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,20 @@ de şunları ekleyiniz::
// 'tags' seçeneğini içerir.
public function findTagged(Query $query, array $options)
{
return $this->find()
->distinct(['Bookmarks.id'])
->matching('Tags', function ($q) use ($options) {
if (empty($options['tags'])) {
return $q->where(['Tags.title IS' => null]);
}
return $q->where(['Tags.title IN' => $options['tags']]);
});
$bookmarks = $this->find()
->select(['id', 'url', 'title', 'description']);

if (empty($options['tags'])) {
$bookmarks
->leftJoinWith('Tags')
->where(['Tags.title IS' => null]);
} else {
$bookmarks
->innerJoinWith('Tags')
->where(['Tags.title IN ' => $options['tags']]);
}

return $bookmarks->group(['Bookmarks.id']);
}

Biz :ref:`özel bulucu metodu <custom-find-methods>` geliştirdik. Bu CakePHP nin
Expand Down