Add docblocks
This commit is contained in:
parent
200e357bf6
commit
edee780079
1 changed files with 19 additions and 0 deletions
|
@ -7,6 +7,9 @@ use Twig\TwigFunction;
|
|||
|
||||
class SpeakersExtension extends AbstractExtension
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
|
@ -15,6 +18,14 @@ class SpeakersExtension extends AbstractExtension
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the speakers for a session.
|
||||
*
|
||||
* @param array|object $session
|
||||
* @param array $speakers
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSessionSpeakers($session, array $speakers): array
|
||||
{
|
||||
return collect($speakers)->filter(function ($speaker) use ($session): bool {
|
||||
|
@ -22,6 +33,14 @@ class SpeakersExtension extends AbstractExtension
|
|||
})->values()->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the sessions for a speaker.
|
||||
*
|
||||
* @param array|object $speaker
|
||||
* @param array $sessions
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSpeakerSessions($speaker, array $sessions): array
|
||||
{
|
||||
return collect($sessions)->filter(function ($session) use ($speaker): bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue