eab / unique-datatypes-bundle
eZ Unique Datatypes 扩展程序,适用于 eZ Publish
2.0.1
2018-10-31 08:10 UTC
Requires
- ezsystems/ezpublish-kernel: ^6.0|^7.0
Suggests
- eab/ezuniquedatatypes: To edit this field type in legacy administration interface
This package is not auto-updated.
Last update: 2024-09-14 18:21:18 UTC
README
摘要
eZ Publish 5/Platform bundle 包装 eZ Unique Datatypes 扩展程序,适用于 eZ Publish 4.0。
这是一个常见的数据类型集合,其验证已扩展,以便在给定内容对象属性中验证其唯一性。否则,这些数据类型的行为与其原型完全相同。
目前提供两种数据类型
- 唯一字符串(基于文本行系统数据类型),
- 唯一 URL(基于 URL 系统数据类型)。
使用这些数据类型的字段可以使用 Symfony 栈显示。要编辑它们,您需要使用旧栈。
版权
部分版权(C)2007 mediaSELF.pl 部分版权(C)2015 Enterprise AB Ltd
许可证
根据 GNU 通用公共许可证 2.0 许可。
要求
需要 eZ Publish 5 或 eZ Platform。
安装
-
您可以使用 composer 安装程序包。如果您有 eZ Platform,请使用版本 2
composer require --update-no-dev --prefer-dist "eab/unique-datatypes-bundle":"~2.0"
如果您有 eZ Publish 5,请使用版本 1
composer require --update-no-dev --prefer-dist "eab/unique-datatypes-bundle":"~1.0"
或使用 git 克隆程序包
cd src git clone https://github.com/eab-dev/UniqueDatatypesBundle.git Eab/UniqueDatatypesBundle
-
编辑文件
ezpublish/EzPublishKernel.php
,查找函数registerBundles()
并添加new Eab\UniqueDatatypesBundle\EabUniqueDatatypesBundle(),
-
运行(在 Windows 上,您应该具有管理员权限以创建符号链接)
php ezpublish/console ezpublish:legacybundles:install_extensions php ezpublish/console ezpublish:legacy:script bin/php/ezpgenerateautoloads.php php ezpublish/console cache:clear --no-warmup --env=prod
-
使用 eZ Publish 的管理界面添加使用此数据类型的内容类型字段并创建一些内容。
-
使用
ez_render
函数在 Twig 模板中测试它。