定制 monsieurbiz/sylius-cms-block-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

monsieurbiz/sylius-cms-block-plugin

最新稳定版本:v2.0.5

Composer 安装命令:

composer require monsieurbiz/sylius-cms-block-plugin

包简介

Save rich editor contents in database and use it as UI Element

README 文档

README

Tests Status Recipe Status Security Status

Compatibility

Sylius Version PHP Version
2.0, 2.1 8.2 - 8.3

ℹ️ For Sylius 1.x, see our 1.x branch and all 1.x releases.

Installation

If you want to use our recipes, you can configure your composer.json by running:

composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
composer require monsieurbiz/sylius-cms-block-plugin

If you do not use the recipes :

Change your config/bundles.php file to add the line for the plugin :

<?php
return [
    //..
    MonsieurBiz\SyliusCmsBlockPlugin\MonsieurBizSyliusCmsBlockPlugin::class => ['all' => true],
];

Then create the config file in config/packages/monsieurbiz_sylius_cms_block_plugin.yaml :

imports:
    resource: '@MonsieurBizSyliusCmsBlockPlugin/Resources/config/config.yaml'

Finally import the routes in config/routes/monsieurbiz_sylius_cms_block_plugin.yaml :

imports:
    resource: '@MonsieurBizSyliusCmsBlockPlugin/Resources/config/routes.yaml'

If you want to have the wireframe of block element in the Rich Editor, copy the file :

cp vendor/monsieurbiz/sylius-cms-block-plugin/src/Resources/views/wireframe/block.svg.twig templates/bundles/MonsieurBizSyliusRichEditorPlugin/Wireframe/block.svg.twig

Migrations

First, please run legacy-versioned migrations by using command :

bin/console doctrine:migrations:migrate

Example

Admin list

Manage your block in admin

Grid of blocks in Sylius admin

Admin form

Manage the content of your block, you can decide to disable or enable it to display it anywhere you used it.

Form of a block in Sylius Admin

Include it in your content

For example in your Homepage ou CMS Page, by using block element in your Rich Editor.

Block element in rich editor

Displays in front

You can use it in multiple places, it will shown the same content everywhere.

Block displayed in front

If you disable the block, it will not be displayed anymore.

License

This plugin is under the MIT license. Please see the LICENSE file for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-17