承接 modera/backend-tools-settings-bundle 相关项目开发

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

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

modera/backend-tools-settings-bundle

最新稳定版本:v5.0.0

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

统计信息

  • 总下载量: 4.1k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 5
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固