iliain/silverstripe-visualfields
最新稳定版本:2.1.0
Composer 安装命令:
composer require iliain/silverstripe-visualfields
包简介
Provides a number of CMS fields that display images
README 文档
README
Provides similar functionality to heyday/silverstripe-colorpalette, but uses images rather than colours.
Installation (with composer)
composer require iliain/silverstripe-visualfields
Usage
$fields->addFieldToTab('Root.Main', $typeField = VisualOptionField::create('IconType', 'Type', [ 'icon-1' => $iconFolderPath . '/icon-1.png', 'icon-2' => $iconFolderPath . '/icon-2.png', 'icon-3' => $iconFolderPath . '/icon-3.png', 'icon-4' => $iconFolderPath . '/icon-4.png', ]));
Customising
You can customise the size and background colour of the images with the following options:
$typeField ->optionWidth('125px') ->optionHeight('125px') ->backgroundColour('#efe6da') // Only visible if the image has transparency ->imageSize('cover');
统计信息
- 总下载量: 716
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-07-21

