Inline
This commit is contained in:
parent
7a49f59294
commit
ed29c5a92b
|
@ -53,11 +53,9 @@ class FormatTalksExtension extends Twig_Extension
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getUpcoming(array $data) {
|
public function getUpcoming(array $data) {
|
||||||
$talks = $this->format($data)->filter(function ($talk) {
|
return $this->sort($this->format($data)->filter(function ($talk) {
|
||||||
return $talk['event']['date'] >= $this->today;
|
return $talk['event']['date'] >= $this->today;
|
||||||
});
|
}));
|
||||||
|
|
||||||
return $this->sort($talks);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,11 +68,9 @@ class FormatTalksExtension extends Twig_Extension
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getPast(array $data) {
|
public function getPast(array $data) {
|
||||||
$talks = $this->format($data)->filter(function ($talk) {
|
return $this->sort($this->format($data)->filter(function ($talk) {
|
||||||
return $talk['event']['date'] < $this->today;
|
return $talk['event']['date'] < $this->today;
|
||||||
});
|
}));
|
||||||
|
|
||||||
return $this->sort($talks);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue