briceburg/silverstripe-flexichoice
最新稳定版本:0.1.0
Composer 安装命令:
composer require briceburg/silverstripe-flexichoice
包简介
SilverStripe field for providing arbitrary text input or selecting from YAML configurable presets.
README 文档
README
SilverStripe field for providing arbitrary text input or selecting from YAML configurable presets.
Requirements
SilverStripe 3+
Screenshots
(the 'Link Text' field demonstrates a FlexiChoiceField,
the 'Link' field is a silverstripe-flexilink field)
Usage
- Add
FlexiChoicefield types to yourDataObject(s)
class BlockContentHeading extends DataObject { private static $db = array( 'Title' => 'Varchar', 'Content' => 'Text', 'Link' => 'FlexiLink', 'LinkText' => 'FlexiChoice', // <--- here );
Trigger the environment builder (/dev/build) after extending objects --
You will now see the FlexiChoiceField appear in the CMS when editing your
object.
- Define presets in YAML Configuration
FlexiChoiceField: choices: - LEARN MORE - READ MORE - MORE - GET STARTED
You may of course subclass FlexiChoiceField to provide multiple fields with
different choice selections.
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-01-28
