group date and slices in display of poll
This commit is contained in:
parent
723c774d51
commit
c0791d52ac
|
@ -61,12 +61,23 @@ class Choice {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display( $kind = 'text' ): array {
|
public function display( $kind = 'text' ): array {
|
||||||
$fields = [
|
if($kind == 'text'){
|
||||||
'id' => $this->getId(),
|
$fields = [
|
||||||
'created_at' => $this->getCreatedAtAsString(),
|
'id' => $this->getId(),
|
||||||
'name' => $this->getName(),
|
'created_at' => $this->getCreatedAtAsString(),
|
||||||
'url' => $this->getUrl(),
|
'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;
|
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