heimrichhannot/contao-config-element-type-bundle
最新稳定版本:0.2.1
Composer 安装命令:
composer require heimrichhannot/contao-config-element-type-bundle
包简介
Contains interface and common config type elements for bundle with config type support
README 文档
README
This bundle contains a generic interface, an generic data class and concrete independent implementations for config element types.
Config element types are designed to specify things that can occur multiple times on the same item (e.g. many fields of the same type) and used in List Bundle and Reader Bundle.
Setup
This bundle is a dependency bundle and has no usage as standalone package. If you want to create an extension that uses this bundle, add it to your composer.json file.
Install with composer:
composer require heimrichhannot/contao-config-element-type-bundle
Usage
The main content of this bundle is the ConfigElementTypeInterface. Example implementations can be found within the bundled config element types.
The ConfigElementTypeInterface has three methods:
public static function getType(): string- Returns an alias for identifying the content element type, typically used in database or translation context.public function getPalette(string $prependPalette, string $appendPalette): string- Return the contao dca palette. The paremeters can be used if you have default palette fields to prepend or append to the palette.public function applyConfiguration(ConfigElementData $configElementData): ConfigElementResult- Here the config element type logic is applied. Typically a raw field value is processed and a formatted field value returned.
Real life usage examples can be found in Reader Bundle and List Bundle.
统计信息
- 总下载量: 3.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2020-08-21