heimrichhannot/contao-be_hyperlink-bundle
最新稳定版本:2.0.2
Composer 安装命令:
composer require heimrichhannot/contao-be_hyperlink-bundle
包简介
This bundle offers a simple backend hyperlink form field (text link or button).
README 文档
README
This bundle offers a simple backend hyperlink form field (text link or button).
For Contao 3 compability check out the contao-3 branch.
Requirements
- Contao 4 (only tested with 4.4 LTS)
- PHP7 (only tested with PHP ^7.1)
Technical instructions
Just add the field to some of your data container arrays as follows:
$GLOBALS['TL_DCA']['tl_*']['fields']['myHyperlink'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_*']['myHyperlink'],
'inputType' => 'hyperlink',
'eval' => array(
'text' => &$GLOBALS['TL_LANG']['tl_*']['myHyperlinkText'], // string
'linkClass' => 'tl_submit', // use this for contao's button styling
'tl_class' => 'long',
'target' => '_blank',
// the url can be specified as string, callback array ora callable function
'url' => 'http://www.example.org',
'url' => ['MyClass', 'getUrl'],
'url' => function(\DataContainer $objDc) {
return sprintf('http://www.example.org?id=%s', $objDc->id);
}
)
);
统计信息
- 总下载量: 886
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2018-01-19