|
|
|
|
|
|
|
|
namespace backend\controllers; |
|
|
namespace backend\controllers; |
|
|
|
|
|
|
|
|
use yii ; |
|
|
use yii ; |
|
|
|
|
|
use common\models\Etablissement ; |
|
|
|
|
|
|
|
|
class BackendController extends \yii\web\Controller |
|
|
class BackendController extends \yii\web\Controller |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
public function beforeAction($event) |
|
|
public function beforeAction($event) |
|
|
{ |
|
|
{ |
|
|
if(Yii::$app->user->identity->etatPaiementEtablissement() == 'essai-terminee') |
|
|
|
|
|
|
|
|
if(!Yii::$app->user->isGuest && |
|
|
|
|
|
(Yii::$app->user->identity->etatPaiementEtablissement() == Etablissement::PAIEMENT_ESSAI_TERMINE || |
|
|
|
|
|
Yii::$app->user->identity->etatPaiementEtablissement() == Etablissement::PAIEMENT_RETARD)) |
|
|
{ |
|
|
{ |
|
|
$this->redirect(['paiement/index']) ; |
|
|
$this->redirect(['paiement/index']) ; |
|
|
} |
|
|
} |