Rename getAll to findAll, remove published argument
This commit is contained in:
parent
afc0a0e448
commit
abe0f3d93b
3 changed files with 8 additions and 12 deletions
|
@ -21,16 +21,12 @@ final class TalkRepository {
|
|||
/**
|
||||
* @return Collection|Talk[]
|
||||
*/
|
||||
public function getAll(bool $publishedOnly = FALSE): Collection {
|
||||
$properties = ['type' => 'talk'];
|
||||
public function findAll(): Collection {
|
||||
$talks = $this->nodeStorage->loadByProperties([
|
||||
'type' => 'talk',
|
||||
]);
|
||||
|
||||
if ($publishedOnly) {
|
||||
$properties['status'] = TRUE;
|
||||
}
|
||||
|
||||
return new Collection(
|
||||
$this->nodeStorage->loadByProperties($properties)
|
||||
);
|
||||
return new Collection($talks);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue