group date and slices in display of poll
parent
723c774d51
commit
c0791d52ac
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
1237
src/Entity/Poll.php
1237
src/Entity/Poll.php
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue