|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Crée une commande récurrente. |
|
|
|
|
|
|
|
|
* Crée un abonnement |
|
|
*/ |
|
|
*/ |
|
|
public function actionForm(int $id = 0) |
|
|
public function actionForm(int $id = 0) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
return $this->redirect($this->getUrlManagerFrontend()->createAbsoluteUrl(['site/producer', 'id' => $producer->id])); |
|
|
return $this->redirect($this->getUrlManagerFrontend()->createAbsoluteUrl(['site/producer', 'id' => $producer->id])); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$subscriptionModule = $this->getSubscriptionModule(); |
|
|
|
|
|
if($id) { |
|
|
|
|
|
$subscription = $subscriptionModule->getRepository()->findOneSubscriptionById($id); |
|
|
|
|
|
if(!$subscription) { |
|
|
|
|
|
$this->setFlash('error', 'Abonnement introuvable'); |
|
|
|
|
|
return $this->redirect(['subscription/index']); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return $this->render('form', [ |
|
|
return $this->render('form', [ |
|
|
'idSubscription' => $id |
|
|
'idSubscription' => $id |
|
|
]); |
|
|
]); |