Blame view

frontend/controllers/CompanyController.php 2.22 KB
fbdb1f1c   Yarik   test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
  <?php
  namespace frontend\controllers;
  
  use Yii;
  use common\models\LoginForm;
  use frontend\models\PasswordResetRequestForm;
  use frontend\models\ResetPasswordForm;
  use frontend\models\SignupForm;
  use frontend\models\ContactForm;
  use frontend\models\Options;
  use frontend\models\OptionValues;
  use yii\base\InvalidParamException;
  use yii\web\BadRequestHttpException;
  use yii\web\Controller;
  use yii\filters\VerbFilter;
  use yii\filters\AccessControl;
  use frontend\models\OptionsToValues;
  use yii\validators\EmailValidator;
  use common\models\User;
  use yii\helpers\VarDumper;
  use common\models\Page; 
  use frontend\models\Option;
  use common\models\Social;
  
  
  /**
   * Site controller
   */
  class CompanyController extends Controller
  {
      public $layout = 'company';
  
      public $defaultAction = 'common';
  
      /**
       * @inheritdoc
       */
      public function actions()
      {
          return [
              'error' => [
                  'class' => 'yii\web\ErrorAction',
              ],
              'captcha' => [
                  'class' => 'yii\captcha\CaptchaAction',
                  'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
              ],
          ];
      }
  
      public function actionIndex()
      {
          $this->redirect(['site/index']);
      }
  
      public function actionCommon(/*$company_id*/)
      {
          return $this->render('common');
      }
  
      public function actionPortfolio(/*$company_id*/)
      {
          return $this->render('portfolio');
      }
  
      public function actionTeam(/*$company_id*/)
      {
          return $this->render('team');
      }
  
      public function actionBlog(/*$company_id*/)
      {
          return $this->render('blog-list');
      }
  
      public function actionBlogView(/*$company_id, $article_id*/)
      {
          return $this->render('blog-view');
      }
  
      public function actionReview(/*$company_id*/)
      {
          return $this->render('review');
      }
  
      public function actionVacancyList(/*$company_id*/)
      {
          return $this->render('vacancy-list');
      }
  
      public function actionVacancyView(/*$company_id, $vacancy_id*/)
      {
          return $this->render('vacancy-view');
      }
  
      public function actionGallery(/*$company_id*/)
      {
          $this->layout = 'gallery-company';
          return $this->render('gallery');
      }
  }