| @@ 89-100 (lines=12) @@ | ||
| 86 | /** |
|
| 87 | * {@inheritdoc} |
|
| 88 | */ |
|
| 89 | public function findAll($page = 1, $pageSize = null) |
|
| 90 | { |
|
| 91 | $search = $this->repository->createSearch()->addQuery(new MatchAllQuery()); |
|
| 92 | ||
| 93 | if (!$pageSize) { |
|
| 94 | $search->setScroll('10m'); |
|
| 95 | } else { |
|
| 96 | $search = $search->setFrom(($page - 1) * $pageSize)->setSize($pageSize); |
|
| 97 | } |
|
| 98 | ||
| 99 | return $this->execute($search); |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * {@inheritdoc} |
|
| @@ 143-154 (lines=12) @@ | ||
| 140 | /** |
|
| 141 | * {@inheritdoc} |
|
| 142 | */ |
|
| 143 | public function findByParent(ActivityLogInterface $activityLog, $page = 1, $pageSize = null) |
|
| 144 | { |
|
| 145 | $search = $this->repository->createSearch()->addQuery(new TermQuery('parentUuid', $activityLog->getUuid())); |
|
| 146 | ||
| 147 | if (!$pageSize) { |
|
| 148 | $search->setScroll('10m'); |
|
| 149 | } else { |
|
| 150 | $search->setFrom(($page - 1) * $pageSize)->setSize($pageSize); |
|
| 151 | } |
|
| 152 | ||
| 153 | return $this->execute($search); |
|
| 154 | } |
|
| 155 | ||
| 156 | /** |
|
| 157 | * {@inheritdoc} |
|