Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function beforeAction($action)
- {
- if ($action->id == 'send-contact-form' || $action->id == 'contact-validate') {
- $this->enableCsrfValidation = false;
- } elseif ($action->id == 'error') {
- $theme = 'color';
- Yii::$app->view->theme = new Theme([
- 'basePath' => '@frontend/themes/' . $theme,
- 'baseUrl' => '@web/themes/' . $theme,
- 'pathMap' => [
- '@app/views' => '@frontend/themes/' . $theme . '/views',
- '@app/widgets' => '@frontend/themes/' . $theme . '/widgets',
- ]]);
- Yii::setAlias('@theme', Yii::$app->view->theme->basePath);
- $this->layout = 'conference';
- }
- return parent::beforeAction($action); // TODO: Change the autogenerated stub
- }
Add Comment
Please, Sign In to add comment