group date and slices in display of poll

master
Tykayn 2 years ago committed by tykayn
parent 723c774d51
commit c0791d52ac
  1. 23
      src/Entity/Choice.php
  2. 1209
      src/Entity/Poll.php

@ -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
Loading…
Cancel
Save