承接 maddoger/yii2-cms-core 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

maddoger/yii2-cms-core

最新稳定版本:v1.1.0

Composer 安装命令:

composer require maddoger/yii2-cms-core

包简介

CMS Core extension for Yii2.

README 文档

README

Yii2 Core Module by maddoger

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist maddoger/yii2-cms-core "*"

or add

"maddoger/yii2-cms-core": "*"

to the require section of your composer.json file.

Logging to DB

'log' => [
    'traceLevel' => YII_DEBUG ? 3 : 0,
    'targets' => [

        'db' => [
            'class' => 'yii\log\DbTarget',
            'levels' => ['error', 'warning'],
            'except'=>['yii\web\HttpException:*', 'yii\i18n\I18N\*'],
            'prefix'=>function () {
                $url = !Yii::$app->request->isConsoleRequest ? Yii::$app->request->getUrl() : null;
                return sprintf('[%s][%s]', Yii::$app->id, $url);
            },
            'logTable' => '{{%core_log}}',
        ],
    ],
],

Configuration

Configurations in modules - properties - models (frontend & backend)

For usage: - loading - reading interface (model or property)

For editing: - view - model - load/save interface

ConfigurationBehavior

Universal behavior.

'configurationBehavior' => [
    'class' => ConfigurationBehavior::className(),
    'key' => $this->id.'_custom', //owner class by default

    //Reading
    'attributes' => [
        //Default values
        'logoText' => $this->logoText,
        'logoImageUrl' => $this->logoImageUrl,
        'sortNumber' => $this->sortNumber,
    ],
    'saveToOwnerProperties' => true, // if true all attributes will be written in owner properties
                                     // otherwise configuration model/array will be available through getConfiguration()

    //Editing
    'view' => $this->getViewPath() . DIRECTORY_SEPARATOR . 'configuration.php',
    //Model for user
    'modelClass' => 'maddoger\admin\model\Configuration.php',
    //OR
    'dynamicModel' => [
        'formName' => $this->id,
        'rules' => [
            [['logoText', 'logoImageUrl'], 'string'],
            [['logoText', 'logoImageUrl', 'sortNumber'], 'default', ['value' => null]],
        ],
    ]
]

统计信息

  • 总下载量: 47
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-10-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固