diff --git a/homepage/participo/lib/participoLib/planer.php b/homepage/participo/lib/participoLib/planer.php index 69b3b93..ea7ea0c 100644 --- a/homepage/participo/lib/participoLib/planer.php +++ b/homepage/participo/lib/participoLib/planer.php @@ -1,5 +1,8 @@ promoImgUrl = $promoImgUrl; } + public function getId() + { + return $this->id; + } + public function getName() { - return $this->name; + return ($this->name != null ? $this->name : 'Wettkampf ohne Namen'); + } + + public function getHtmlDate() + { + return ($this->date != null ? $this->date->format('Y-m-d') : 'fehlendes Datum'); } public function getAgeClasses() { - return $this->ageclasses ? $this->ageclasses : '-'; + return ($this->ageclasses != null ? $this->ageclasses : '-'); } - public function getId() + public function getPlace() { - return $this->id; + return ($this->place != null ? $this->place : '-'); } public static function fromArray($member) @@ -55,6 +68,26 @@ class shiai $member['promoPic'] ?? null ); } + + /** + * shiai event as html code for displaying + * + * @return html formated string + */ + public function getHtml() + { + $retHtml = ''; + $retHtml = + '