'app-frontend', 'homeUrl' => '/', 'basePath' => dirname(__DIR__), 'bootstrap' => [ 'log', 'assetsAutoCompress', ], 'controllerNamespace' => 'frontend\controllers', 'container' => [ 'singletons' => [ 'artbox\core\services\Languages' =>'artbox\core\services\Languages', ] ], 'modules' => [ 'feedback' => [ 'class' => 'artbox\core\forms\Module', 'activeRecord' => "artbox\core\models\Feedback", 'attributes' => [ 'name', 'email', 'message', ], 'rules' => [ [ [ 'email' ], 'email', ], [ [ 'email', 'name', 'message', ], 'required', ], ], 'labels' => [ 'email' => 'Email', 'name' => 'Name', 'message' => 'You question', ], 'inputOptions' => [ 'message' => [ 'type' => 'textarea', 'options' => [], ], ], 'scenario' => 'feedback', 'sendEmail' => false, 'formId' => 'feedback-form', 'ajax' => true, 'successCallback' => 'function (data) { document.getElementById("feedback-form").reset(); $(".close").click(); if (data.status == "success"){ $(".success_").animate({opacity: 1, top: \'40\'}, 200).addClass("done_"); setTimeout(function(){$(".success_").animate({opacity: 0, top: \'0\'}, 200,function(){ $(this).removeClass("done_"); })}, 4000); } }', ], 'contact' => [ 'class' => 'artbox\core\forms\Module', 'activeRecord' => "artbox\core\models\Feedback", 'templateForm' => '
{form}
', 'attributes' => [ 'name', 'email', 'phone', 'message', ], 'rules' => [ [ [ 'email' ], 'email', ], [ [ 'email', 'name', 'phone', ], 'required', ] ], 'labels' => [ 'email' => 'Email', 'name' => 'Name', 'message' => 'Message', 'phone' => 'Phone' ], 'inputOptions' => [ 'name' => [ 'template' => '
{input}
' ], 'email' => [ 'template' => '
{input}
' ], 'phone' => [ 'template' => '
{input}
' ], 'message' => [ 'type' => 'textarea', 'options' => [], 'template' => '
{input}
' ], ], 'buttonTemplate' => '
{button}
', 'buttonOptions' => [ 'class' => 'btn btn-template-main', ], 'buttonContent' => ' Send message', 'sendEmail' => false, 'ajax' => true, 'formId' => 'contact-form', 'scenario' => 'default', 'successCallback' => 'function (data) { document.getElementById("contact-form").innerHTML = ""; $(".close").click(); if (data.status == "success"){ $(".success_").animate({opacity: 1, top: \'40\'}, 200).addClass("done_"); setTimeout(function(){$(".success_").animate({opacity: 0, top: \'0\'}, 200,function(){ $(this).removeClass("done_"); })}, 4000); } }', ], 'comments' => [ 'class' => 'artbox\core\forms\Module', 'activeRecord' => "common\models\Comment", 'attributes' => [ 'name', 'email', 'comment', 'entity_id', 'entity', 'parent_id' ], 'templateForm' => '
Додати коментар
{form}', 'rules' => [ [ [ 'name', 'email', ], 'required', ] ], 'labels' => [ 'name' => 'Ім\'я', 'email' => 'Пошта', 'comment' => 'коментар', 'entity_id' => false, 'entity' => false, 'parent_id' => false ], 'inputOptions' => [ 'name' => [ 'template' => '
{input}
' ], 'email' => [ 'template' => '
{input}
' ], 'comment' => [ 'type' => 'textarea', 'options' => [], 'template' => '
{input}
' ], ], 'buttonTemplate' => '
{button}
', 'buttonOptions' => [], 'buttonContent' => 'Додати', 'sendEmail' => false, 'ajax' => true, 'formId' => 'comment-form', 'scenario' => 'default', 'successCallback' => 'function (data) { document.getElementById("comment-form").reset(); $("#comment-form").parent().html("

Ваш коментар з\'явиться після перевірки модератором

") $("#comment-form").remove(); }', ], 'commentsChild' => [ 'class' => 'artbox\core\forms\Module', 'activeRecord' => "common\models\Comment", 'attributes' => [ 'name', 'email', 'comment', 'entity_id', 'entity', 'parent_id' ], 'templateForm' => '
Відповісти
{form}', 'rules' => [ [ [ 'name', 'email', ], 'required', ] ], 'labels' => [ 'name' => 'Ім\'я', 'email' => 'Пошта', 'comment' => 'коментар', 'entity_id' => false, 'entity' => false, 'parent_id' => false ], 'inputOptions' => [ 'name' => [ 'template' => '
{input}
' ], 'email' => [ 'template' => '
{input}
' ], 'comment' => [ 'type' => 'textarea', 'options' => [], 'template' => '
{input}
' ], ], 'buttonTemplate' => '
{button}
', 'buttonOptions' => [], 'buttonContent' => 'Додати', 'sendEmail' => false, 'ajax' => true, 'formId' => 'answer-form', 'scenario' => 'default', 'successCallback' => 'function (data) { document.getElementById("answer-form").reset(); $("#answer-form").parent().html("

Ваш коментар з\'явиться після перевірки модератором

") $("#answer-form").remove(); }', ], ], 'components' => [ 'assetManager' => [ 'bundles' => [ 'yii\bootstrap\BootstrapAsset' => [ 'css' => [] ], // new version gentenella // 'kartik\select2\Select2Asset' => [ // 'css' => [], // ], // 'kartik\select2\ThemeKrajeeAsset' => [ // 'css' => [] // ] ], 'appendTimestamp' => true, ], 'user' => [ 'identityClass' => 'common\models\Author', 'enableAutoLogin' => true, 'identityCookie' => [ 'name' => '_identity-frontend', 'httpOnly' => true, ], ], 'request' => [ 'csrfParam' => '_csrf-frontend', 'baseUrl' => '', ], 'session' => [ // this is the name of the session cookie used for login on the frontend 'name' => 'advanced-frontend', ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => [ 'error', 'warning', ], ], ], ], 'seo' => [ 'class' => SeoComponent::className(), ], 'errorHandler' => [ 'errorAction' => 'site/error', ], 'urlManager' => [ 'class' => UrlManager::className(), 'baseUrl' => '/', 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [], 'hideDefaultLanguagePrefix' => true, ], 'assetsAutoCompress' => [ 'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent', 'enabled' => true, 'readFileTimeout' => 3, //Time in seconds for reading each asset file 'jsCompress' => true, //Enable minification js in html code 'jsCompressFlaggedComments' => true, //Cut comments during processing js 'cssCompress' => true, //Enable minification css in html code 'cssFileCompile' => true, //Turning association css files 'cssFileRemouteCompile' => false, //Trying to get css files to which the specified path as the remote file, skchat him to her. 'cssFileCompress' => true, //Enable compression and processing before being stored in the css file 'cssFileBottom' => false, //Moving down the page css files 'cssFileBottomLoadOnJs' => false, //Transfer css file down the page and uploading them using js 'jsFileCompile' => true, //Turning association js files 'jsFileRemouteCompile' => false, //Trying to get a js files to which the specified path as the remote file, skchat him to her. 'jsFileCompress' => true, //Enable compression and processing js before saving a file 'jsFileCompressFlaggedComments' => true, //Cut comments during processing js 'htmlCompress' => true, //Enable compression html 'noIncludeJsFilesOnPjax' => true, //Do not connect the js files when all pjax requests 'htmlFormatter' => [ //Enable compression html 'class' => 'skeeks\yii2\assetsAuto\formatters\html\TylerHtmlCompressor', 'extra' => false, //use more compact algorithm 'noComments' => true, //cut all the html comments 'maxNumberRows' => 50000, //The maximum number of rows that the formatter runs on //or // 'class' => 'skeeks\yii2\assetsAuto\formatters\html\MrclayHtmlCompressor', //or any other your handler implements skeeks\yii2\assetsAuto\IFormatter interface //or false ], ], ], 'params' => $params, ];