定制 heimrichhannot/contao-linkchecker-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

heimrichhannot/contao-linkchecker-bundle

Composer 安装命令:

composer require heimrichhannot/contao-linkchecker-bundle

包简介

Simple link checker tool, that comes with an back end widget and LinkChecker class.

README 文档

README

Contao link checker Bundle

Simple link checker tool, that comes with an back end widget and LinkChecker class. Using php get_headers() function. Link test within widget is done via xhr call.

alt fieldpalette wizard LinkChecker back end widget

Technical instructions

Test links

If you want to test a single link, or multiple links, simply call:

\Contao\System::getContainer()->get('huh.linkchecker.manager.linkchecker')test('http://www.google.de');
\Contao\System::getContainer()->get('huh.linkchecker.manager.linkchecker')test(array('http://www.google.de', 'http://www.twitter.com'));

Back end widget / field

In back end mode there is a widget available called linkChecker; Provide a valid load_callback within you DataContainer field configuration.

//tl_sample.php 

'linkChecker'       => array(
	'label'         => &$GLOBALS['TL_LANG']['tl_sample']['linkChecker'],
	'inputType'     => 'linkChecker',
	'eval'          => array(
	    'linkCheckerTimeout' => 10,
	),
	'load_callback' => array(
		array('MyClass', 'getLinkCheckerHtml'),
	),
),

You can return html-code with anchor tags, a single link or an array of links within your load_callback. The linkCheckerTimeout eval option configures the timeout in seconds for the backend link check. If omitted or invalid, the default timeout is 10 seconds.

// MyClass

public function getLinkCheckerHtml($varValue, \DataContainer $dc)
{
	return '<a href="http://google.de">Google</a>'
}

统计信息

  • 总下载量: 2.13k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2018-03-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固