228vit/my-config-plugin
Composer 安装命令:
composer require 228vit/my-config-plugin
包简介
Symfony 1.4+ plugin. Make all settings editable from backend
README 文档
README
Yet another alternative setting plugin
* Installation
$ git submodule add git://github.com/228vit/myConfigPlugin.git plugins/myConfigPlugin
$ git submodule init
$ git submodule update
$ symfony doctrine:generate-migrations-diff
$ symfony doctrine:generate-migrate
* Enable plugin in config/ProjectConfiguration.class.php
{{{
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->enablePlugin('myConfigPlugin');
}}}
* Usage
{{{
myConfig::get(settingName, settingDefaultValue, settingNote);
}}}
Please note, if setting does not exists, new one will be created with default value.
* Manage settings in admin
Enable admin module in setting.yml
$ symfony doctrine:generate-admin backend Config
backend.php/config
* Dump all setting into sfConfig
Edit apps/appName/config/filters.yml
myConfig:
class: myConfigFilter
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-30