Skip to content

Commit

Permalink
Update Adapter.php
Browse files Browse the repository at this point in the history
Adicionando notMatching na paginação
  • Loading branch information
armenio committed Jan 21, 2019
1 parent d9f9914 commit 7b8d355
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/ORM/Paginator/Adapter/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ public function getItems($offset, $itemsPerPage)
}
}

if (isset($params['not_matching']) && !empty($params['not_matching'])) {
foreach ($params['not_matching'] as $assoc => $builder) {
$finder->notMatching($assoc, $builder);
}
}

return $finder->all();
}

Expand All @@ -70,6 +76,12 @@ public function count()
}
}

if (isset($params['not_matching']) && !empty($params['not_matching'])) {
foreach ($params['not_matching'] as $assoc => $builder) {
$finder->notMatching($assoc, $builder);
}
}

return $finder->count();
}
}

0 comments on commit 7b8d355

Please sign in to comment.