2017 © Pedro Peláez
 

contao-module contao-linkchecker-bundle

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

image

heimrichhannot/contao-linkchecker-bundle

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

  • Wednesday, May 9, 2018
  • by digitales@heimrich-hannot.de
  • Repository
  • 6 Watchers
  • 0 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 153 % Grown

The README.md

, (*1)

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., (*2)

alt fieldpalette wizard LinkChecker back end widget, (*3)

Technical instructions

If you want to test a single link, or multiple links, simply call:, (*4)

\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., (*5)

//tl_sample.php 

'linkChecker'       => array(
    'label'         => &$GLOBALS['TL_LANG']['tl_sample']['linkChecker'],
    'inputType'     => 'linkChecker',
    '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., (*6)

// MyClass

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

The Versions