mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
migration from framadate 1 choice name using separator for timeSlices in name
This commit is contained in:
parent
afef8edd0b
commit
5716642c09
@ -97,10 +97,10 @@ class MigrationController extends EmailsController {
|
|||||||
$moments = explode( ',', $d->moments );
|
$moments = explode( ',', $d->moments );
|
||||||
foreach ( $moments as $moment ) {
|
foreach ( $moments as $moment ) {
|
||||||
$newChoice = new Choice();
|
$newChoice = new Choice();
|
||||||
|
$dateOfDay = date_create( strtotime( $d->title ) );
|
||||||
$newChoice
|
$newChoice
|
||||||
->setPoll( $poll )
|
->setPoll( $poll )
|
||||||
->setDateTime( date_create( strtotime( $d->title ) ) )
|
->setName( $dateOfDay->format('y-m-d'). ' >>> ' . $moment );
|
||||||
->setName( $moment );
|
|
||||||
|
|
||||||
$pollChoicesOrderedBySlug[ $pollSlug ][] = $newChoice;
|
$pollChoicesOrderedBySlug[ $pollSlug ][] = $newChoice;
|
||||||
$poll->addChoice( $newChoice );
|
$poll->addChoice( $newChoice );
|
||||||
|
Loading…
Reference in New Issue
Block a user