undefinedoffset/silverstripe-advancedwidgeteditor 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

undefinedoffset/silverstripe-advancedwidgeteditor

最新稳定版本:2.0.4

Composer 安装命令:

composer require undefinedoffset/silverstripe-advancedwidgeteditor

包简介

Replaces the Widget Editor to enable support for advanced form fields such as UploadField

README 文档

README

CI

Replaces the Widget Editor to enable support for advanced form fields such as SilverStripe\AssetAdmin\Forms\UploadField

Requirements

Installation

composer require undefinedoffset/silverstripe-advancedwidgeteditor

Usage

To use advanced widget editor over the default SilverStripe widgets editor you need to change your extension from WidgetPageExtension to use AdvancedWidgetPageExtension instead.

Page:
  extensions:
    - 'UndefinedOffset\AdvancedWidgetEditor\Extensions\AdvancedWidgetPageExtension'

Controlling Available Widgets per-class

To control widgets on a per-class host class (class which the Advanced Widget Editor is controlling the widget area for), you can use the config property available_widgets for example:

Page:
    available_widgets:
        - "RSSWidget"
        - "MyExampleWidget"

SilverStripe\Blog\Model\Blog:
    available_widgets:
        - 'SilverStripe\Blog\Widgets\BlogArchiveWidget'
        - 'SilverStripe\Blog\Widgets\BlogCategoriesWidget'
        - 'SilverStripe\Blog\Widgets\BlogTagsCloudWidget'
        - 'SilverStripe\Blog\Widgets\BlogRecentPostsWidget'

In the case of the above example the Page class and it's decedent classes will have the RSSWidget and MyExampleWidget available. Where the SilverStripe\Blog\Model\Blog class and it's decendent classes will also have ArchiveWidget, BlogManagementWidget, etc along side the RSSWidget and MyExampleWidget.

You can also restrict widgets from decedent classes using the example above say we want to restrict the SilverStripe\Blog\Model\Blog class to not have access to the RSSWidget but still have Page be allowed to use that widget, for example you can use the bellow:

SilverStripe\Blog\Model\Blog:
    restricted_widgets:
        - "RSSWidget"

Reporting an issue

When you're reporting an issue please ensure you specify what version of SilverStripe you are using. Also be sure to include any JavaScript or PHP errors you receive, for PHP errors please ensure you include the full stack trace. Also please include how you produced the issue. You may also be asked to provide some of the classes to aid in re-producing the issue. Stick with the issue, remember that you seen the issue not the maintainer of the module so it may take allot of questions to arrive at a fix or answer.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-03-06