|
@@ -1006,18 +1006,19 @@ class Event extends AbstractEntity
|
|
|
*/
|
|
*/
|
|
|
public function getFormattedDates(): string
|
|
public function getFormattedDates(): string
|
|
|
{
|
|
{
|
|
|
|
|
+ $formattedDates = '';
|
|
|
if ($this->getDatetimeStart() & $this->getDatetimeEnd()) {
|
|
if ($this->getDatetimeStart() & $this->getDatetimeEnd()) {
|
|
|
if ($this->getDatetimeStart()->format('d-m-Y') != $this->getDatetimeEnd()->format('d-m-Y')) {
|
|
if ($this->getDatetimeStart()->format('d-m-Y') != $this->getDatetimeEnd()->format('d-m-Y')) {
|
|
|
- return 'Du ' . $this->getDatetimeStart()->format('d/m/Y H\hi') . ' au ' . $this->getDatetimeEnd()->format('d/m/Y H\hi');
|
|
|
|
|
|
|
+ $formattedDates = 'Du ' . $this->getDatetimeStart()->format('d/m/Y H\hi') . ' au ' . $this->getDatetimeEnd()->format('d/m/Y H\hi');
|
|
|
} else {
|
|
} else {
|
|
|
- return 'Le ' . $this->getDatetimeStart()->format('d/m/Y') . ' de ' . $this->getDatetimeStart()->format('H\hi') . ' à ' . $this->getDatetimeEnd()->format('H\hi');
|
|
|
|
|
|
|
+ $formattedDates = 'Le ' . $this->getDatetimeStart()->format('d/m/Y') . ' de ' . $this->getDatetimeStart()->format('H\hi') . ' à ' . $this->getDatetimeEnd()->format('H\hi');
|
|
|
}
|
|
}
|
|
|
} else if ($this->getDatetimeStart()) {
|
|
} else if ($this->getDatetimeStart()) {
|
|
|
- return 'A partir du ' . $this->getDatetimeStart()->format('d/m/Y H\hi');
|
|
|
|
|
|
|
+ $formattedDates = 'A partir du ' . $this->getDatetimeStart()->format('d/m/Y H\hi');
|
|
|
} else if ($this->getDatetimeEnd()) {
|
|
} else if ($this->getDatetimeEnd()) {
|
|
|
- return "Jusqu'au " . $this->getDatetimeEnd()->format('d/m/Y H\hi');
|
|
|
|
|
|
|
+ $formattedDates = "Jusqu'au " . $this->getDatetimeEnd()->format('d/m/Y H\hi');
|
|
|
}
|
|
}
|
|
|
- return '';
|
|
|
|
|
|
|
+ return trim($formattedDates);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1046,11 +1047,11 @@ class Event extends AbstractEntity
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * Returns the concateneted adress of the event
|
|
|
|
|
|
|
+ * Returns the concatenated address of the event
|
|
|
*
|
|
*
|
|
|
* @return string
|
|
* @return string
|
|
|
*/
|
|
*/
|
|
|
- public function getFullAddress(): string
|
|
|
|
|
|
|
+ public function getFullAddress(string $delimiter=PHP_EOL): string
|
|
|
{
|
|
{
|
|
|
$address = [];
|
|
$address = [];
|
|
|
|
|
|
|
@@ -1077,7 +1078,16 @@ class Event extends AbstractEntity
|
|
|
}
|
|
}
|
|
|
$address[] = $pc . $this->getCity();
|
|
$address[] = $pc . $this->getCity();
|
|
|
}
|
|
}
|
|
|
- return ucfirst(join(PHP_EOL, $address));
|
|
|
|
|
|
|
+ return trim(ucfirst(join($delimiter, $address)));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Returns the inline concatenated address of the event
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return string
|
|
|
|
|
+ */
|
|
|
|
|
+ public function getInlineFullAddress() {
|
|
|
|
|
+ return $this->getFullAddress(', ');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|