Egorka
6 years ago
39 changed files with 1065 additions and 1193 deletions
@ -1,51 +1,51 @@ |
|||||||
<?php |
<?php |
||||||
return [ |
return [ |
||||||
'aliases' => [ |
'aliases' => [ |
||||||
'@bower' => '@vendor/bower-asset', |
'@bower' => '@vendor/bower-asset', |
||||||
'@npm' => '@vendor/npm-asset', |
'@npm' => '@vendor/npm-asset', |
||||||
], |
], |
||||||
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', |
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', |
||||||
'controllerMap' => [ |
'controllerMap' => [ |
||||||
// Common migrations for the whole application |
// Common migrations for the whole application |
||||||
'migrate' => [ |
'migrate' => [ |
||||||
'class' => 'yii\console\controllers\MigrateController', |
'class' => 'yii\console\controllers\MigrateController', |
||||||
'migrationPath' => [ |
'migrationPath' => [ |
||||||
'@console/migrations', |
'@console/migrations', |
||||||
], |
], |
||||||
], |
], |
||||||
], |
], |
||||||
'components' => [ |
'components' => [ |
||||||
'cache' => [ |
'cache' => [ |
||||||
'class' => 'yii\caching\FileCache', |
'class' => 'yii\caching\FileCache', |
||||||
'cachePath' => '@common/runtime/cache', |
'cachePath' => '@common/runtime/cache', |
||||||
], |
], |
||||||
'authManager' => [ |
'authManager' => [ |
||||||
'class' => 'yii\rbac\DbManager', |
'class' => 'yii\rbac\DbManager', |
||||||
'itemTable' => '{{%auth_items}}', |
'itemTable' => '{{%auth_items}}', |
||||||
'itemChildTable' => '{{%auth_item_children}}', |
'itemChildTable' => '{{%auth_item_children}}', |
||||||
'assignmentTable' => '{{%auth_assignments}}', |
'assignmentTable' => '{{%auth_assignments}}', |
||||||
'ruleTable' => '{{%auth_rules}}', |
'ruleTable' => '{{%auth_rules}}', |
||||||
|
], |
||||||
|
'queue' => [ |
||||||
|
//'class' => 'yii\queue\redis\Queue', |
||||||
|
//'as log' => 'yii\queue\LogBehavior', |
||||||
|
'class' => \yii\queue\file\Queue::class, |
||||||
|
//'path' => '@runtime/queue', |
||||||
|
'path' => '@common/runtime/queue', |
||||||
|
], |
||||||
|
'avatar' => [ |
||||||
|
'class' => \zertex\avatar_generator\AvatarGenerator::class, |
||||||
|
'images_folder' => '@staticRoot/images/avatars', |
||||||
|
'images_url' => '@static/images/avatars', |
||||||
|
'size_width' => 300, // default: 300 |
||||||
|
'font_size' => 200, // default: 200 |
||||||
|
'salt' => 'my_cms_salt', // salt for image file names |
||||||
|
'texture' => ['sun', 'rain'], // texture name |
||||||
|
'texture_over_image' => false, |
||||||
|
'text_over_image' => false, |
||||||
|
], |
||||||
|
'moduleManager' => [ |
||||||
|
'class' => \core\components\modules\ModuleManager::class, |
||||||
], |
], |
||||||
'queue' => [ |
|
||||||
//'class' => 'yii\queue\redis\Queue', |
|
||||||
//'as log' => 'yii\queue\LogBehavior', |
|
||||||
'class' => \yii\queue\file\Queue::class, |
|
||||||
//'path' => '@runtime/queue', |
|
||||||
'path' => '@common/runtime/queue', |
|
||||||
], |
|
||||||
'avatar' => [ |
|
||||||
'class' => \zertex\avatar_generator\AvatarGenerator::class, |
|
||||||
'images_folder' => '@staticRoot/images/avatars', |
|
||||||
'images_url' => '@static/images/avatars', |
|
||||||
'size_width' => 300, // default: 300 |
|
||||||
'font_size' => 200, // default: 200 |
|
||||||
'salt' => 'my_cms_salt', // salt for image file names |
|
||||||
'texture' => ['sun', 'rain'], // texture name |
|
||||||
'texture_over_image' => false, |
|
||||||
'text_over_image' => false, |
|
||||||
], |
|
||||||
'moduleManager' => [ |
|
||||||
'class' => \core\components\modules\ModuleManager::class, |
|
||||||
], |
|
||||||
], |
], |
||||||
]; |
]; |
||||||
|
@ -1,40 +0,0 @@ |
|||||||
<?php |
|
||||||
|
|
||||||
namespace core\forms; |
|
||||||
|
|
||||||
use core\entities\Meta; |
|
||||||
use yii\base\Model; |
|
||||||
use Yii; |
|
||||||
|
|
||||||
class MetaFormOrg extends Model |
|
||||||
{ |
|
||||||
public $title; |
|
||||||
public $description; |
|
||||||
public $keywords; |
|
||||||
|
|
||||||
public function __construct(Meta $meta = null, $config = []) |
|
||||||
{ |
|
||||||
if ($meta) { |
|
||||||
$this->title = $meta->title; |
|
||||||
$this->description = $meta->description; |
|
||||||
$this->keywords = $meta->keywords; |
|
||||||
} |
|
||||||
parent::__construct($config); |
|
||||||
} |
|
||||||
|
|
||||||
public function rules(): array |
|
||||||
{ |
|
||||||
return [ |
|
||||||
[['title'], 'string', 'max' => 255], |
|
||||||
[['description', 'keywords'], 'string'], |
|
||||||
]; |
|
||||||
} |
|
||||||
|
|
||||||
public function attributeLabels() { |
|
||||||
return [ |
|
||||||
'title' => Yii::t('main', 'Title'), |
|
||||||
'description' => Yii::t('main', 'Description'), |
|
||||||
'keywords' => Yii::t('main', 'Keywords'), |
|
||||||
]; |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue