You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
447B

  1. <?php
  2. namespace producer\components ;
  3. class ProducerView extends \common\components\MyView {
  4. var $producer ;
  5. public function getProducer() {
  6. $etablissement = Etablissement::findOne(['slug' => Yii::$app->getRequest()->getQueryParam('slug_producer')]) ;
  7. if($etablissement)
  8. return $etablissement;
  9. else
  10. throw new \yii\web\HttpException(404, 'Etablissement introuvable');
  11. }
  12. }