group date and slices in display of poll

This commit is contained in:
Tykayn 2021-04-30 15:34:04 +02:00 committed by tykayn
parent 723c774d51
commit c0791d52ac
2 changed files with 655 additions and 605 deletions

View File

@ -61,12 +61,23 @@ class Choice {
}
public function display( $kind = 'text' ): array {
$fields = [
'id' => $this->getId(),
'created_at' => $this->getCreatedAtAsString(),
'name' => $this->getName(),
'url' => $this->getUrl(),
];
if($kind == 'text'){
$fields = [
'id' => $this->getId(),
'created_at' => $this->getCreatedAtAsString(),
'name' => $this->getName(),
'url' => $this->getUrl(),
];
}
elseif($kind=='date'){
$fields = [
'id' => $this->getId(),
'created_at' => $this->getCreatedAtAsString(),
'name' => $this->getName(),
// 'url' => $this->getUrl(),
];
}
return $fields;
}

File diff suppressed because it is too large Load Diff