|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace backend\controllers; |
|
|
namespace backend\controllers; |
|
|
|
|
|
|
|
|
|
|
|
use common\models\Producer ; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* UserController implements the CRUD actions for User model. |
|
|
* UserController implements the CRUD actions for User model. |
|
|
*/ |
|
|
*/ |
|
|
class CommuniquerController extends BackendController |
|
|
|
|
|
|
|
|
class CommunicateController extends BackendController |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
public function behaviors() { |
|
|
public function behaviors() { |
|
|
|
|
|
|
|
|
*/ |
|
|
*/ |
|
|
public function actionIndex() |
|
|
public function actionIndex() |
|
|
{ |
|
|
{ |
|
|
$etablissement = Etablissement::findOne(['id' => Yii::$app->user->identity->id_etablissement]); |
|
|
|
|
|
|
|
|
$producer = Producer::searchOne() ; |
|
|
|
|
|
|
|
|
return $this->render('index', [ |
|
|
return $this->render('index', [ |
|
|
'etablissement' => $etablissement, |
|
|
|
|
|
|
|
|
'producer' => $producer, |
|
|
]); |
|
|
]); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* |
|
|
* |
|
|
* @return string |
|
|
* @return string |
|
|
*/ |
|
|
*/ |
|
|
public function actionModeemploi() |
|
|
|
|
|
|
|
|
public function actionInstructions() |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
$etablissement = Etablissement::findOne(['id' => Yii::$app->user->identity->id_etablissement]); |
|
|
|
|
|
|
|
|
$producer = Producer::searchOne() ; |
|
|
|
|
|
|
|
|
// get your HTML raw content without any layouts or scripts |
|
|
// get your HTML raw content without any layouts or scripts |
|
|
$content = $this->renderPartial('mode_emploi_multi', [ |
|
|
|
|
|
|
|
|
$content = $this->renderPartial('instructions_multi', [ |
|
|
'pdf' => true, |
|
|
'pdf' => true, |
|
|
'etablissement' => $etablissement |
|
|
|
|
|
|
|
|
'producer' => $producer |
|
|
]); |
|
|
]); |
|
|
|
|
|
|
|
|
$pdf = new Pdf([ |
|
|
$pdf = new Pdf([ |