modera/backend-tools-settings-bundle
Composer 安装命令:
composer require modera/backend-tools-settings-bundle
包简介
README 文档
README
Provides a unified way of exposing sections that would allow to configure your modules. This bundle contributes a section to "Backend / Tools" called "Settings".
See Modera\BackendToolsSettingsBundle\ModeraBackendToolsSettingsBundle for a list of exposed extension points.
Installation
Step 1: Download the Bundle
composer require modera/backend-tools-settings-bundle:5.x-dev
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
This bundle should be automatically enabled by Flex.
In case you don't use Flex, you'll need to manually enable the bundle by
adding the following line in the config/bundles.php file of your project:
<?php // config/bundles.php return [ // ... Modera\BackendToolsSettingsBundle\ModeraBackendToolsSettingsBundle::class => ['all' => true], ];
How to contribute your own settings section
In order to just contribute a section ( an activity ) to Settings section you need to create a provider class
which would return instances of Modera\BackendToolsSettingsBundle\Section\SectionInterface. This is an example
how to contributor class could look like:
<?php namespace MyCompany\BlogBundle\Contributions; use Modera\BackendToolsSettingsBundle\Section\StandardSection; use Modera\MjrIntegrationBundle\Model\FontAwesome; use Modera\ExpanderBundle\Ext\ContributorInterface; class SettingsSectionsProvider implements ContributorInterface { public function getItems(): array { return [ new StandardSection( 'blog', 'Blog', 'Modera.backend.configutils.runtime.SettingsListActivity', FontAwesome::resolve('cog', 'fas'), ['category' => 'blog'] ) ]; } }
Once you have created a class you need to register it in service container with tag modera_backend_tools_settings.contributions.sections_provider.
<services> <service id="mycompany_blog.contributions.settings_sections_provider" class="MyCompany\BlogBundle\Contributions\SettingsSectionsProvider"> <tag name="modera_backend_tools_settings.contributions.sections_provider" /> </service> </services>
Now if you go to "Backend / Tools / Settings" you should see a section there with name "Blog", it url it will be
named as "blog", icon will be "gear" ( see FontAwesome library ) and Modera.backend.dcab.runtime.SettingsListActivity
javascript activity will be used to create its UI.
Licensing
This bundle is under the MIT license. See the complete license in the bundle: Resources/meta/LICENSE
modera/backend-tools-settings-bundle 适用场景与选型建议
modera/backend-tools-settings-bundle 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 4.1k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 01 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 modera/backend-tools-settings-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 modera/backend-tools-settings-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4.1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-12