diff --git a/homepage/participo/lib/participoLib/event.php b/homepage/participo/lib/participoLib/event.php index 68932b2..89b9a37 100644 --- a/homepage/participo/lib/participoLib/event.php +++ b/homepage/participo/lib/participoLib/event.php @@ -73,13 +73,15 @@ class Event return $this->deadline; } - /** Getter for the shiai + /** Getter for the linked Shiai * - * If the Shiai isn't loaded yet, it is loaded + * - lazy loading: only load if not already loaded (overridable by the $forceLoading param) * - * @return Shiai shiai for the event + * @param boolean $forceLoading if true, the loading is enforced even if there already is a shiai linked + * + * @return Shiai reference to the linked Shiai */ - public function getShiai($forceLoading = false) + public function shiai($forceLoading = false) { // We want to load if it isn't loaded yet or we want to enforce it. But in either case we need an id to load if( (!isset($this->shiai) || $forceLoading) && isset($this->shiaiId) ){ @@ -109,7 +111,7 @@ class Event */ public function asHtmlCard() { - $shiai = $this->getShiai(); + $shiai = $this->shiai(); return '
' . '
' . @@ -128,7 +130,7 @@ class Event public function htmlTableRow() { - $shiai = $this->getShiai(); + $shiai = $this->shiai(); return '' . '' . $this->date->format('Y-m-d') . '' . @@ -144,11 +146,24 @@ class Event '