You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
418 B
16 lines
418 B
<?php
|
|
|
|
class SeasonPage extends Page {
|
|
public function getAllGames() {
|
|
$children = new Pages();
|
|
foreach ($this->children() as $key => $value) {
|
|
$children->add($value->children());
|
|
}
|
|
return $children;
|
|
}
|
|
public function getRunningTournaments() {
|
|
return $this->children()->filter(
|
|
fn ($child) => $child->date()->isEmpty() or $child->date()->toDate()+(60*60*24) > time()
|
|
);
|
|
}
|
|
}
|
|
|