PHP code example of yii2-webivan1 / yii2-seomodule
1. Go to this page and download the library: Download yii2-webivan1/yii2-seomodule library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yii2-webivan1 / yii2-seomodule example snippets
return [
// ...
'modules' => [
// ...
// Seomodule
'seomodule' => [
'class' => 'webivan\seomodule\SeoModule',
// Путь до коннектов, после установки модуля
// можно будет ознакомиться с документацией
// на странице /seomodule/docs
'pathConnects' => '@app/modules/seoConnects',
// Общий доступ к модулю
'accessDoctype' => function () {
// return bool
return !Yii::$app->user->isGuest && Yii::$app->user->can('manager');
},
'accessRulesAction' => [
// Action index, function rule doctype
'index' => function () {
// return bool
return true;
},
// ...
],
// Actions
'actionIndex' => 'webivan\seomodule\actions\ActionIndex',
'actionCreate' => 'webivan\seomodule\actions\ActionCreate',
'actionUpdate' => 'webivan\seomodule\actions\ActionUpdate',
'actionDelete' => 'webivan\seomodule\actions\ActionDelete',
// Models
'modelConfig' => 'webivan\seomodule\models\ConfigMetaData',
'modelSeotext' => 'webivan\seomodule\models\Seotexts',
// Templaters
'filterTemplater' => [
'default' => 'default',
'twig' => 'twig'
],
'classMapTemplater' => [
'default' => 'webivan\seomodule\templaters\def\DefaultTemplater',
'twig' => 'webivan\seomodule\templaters\twig\TwigTemplater'
],
]
]
];