xmlsitemap_engines_test.module in XML sitemap 8
Same filename and directory in other branches
Main file for the XML sitemap engines test.
File
xmlsitemap_engines/tests/modules/xmlsitemap_engines_test/xmlsitemap_engines_test.moduleView source
<?php
/**
* @file
* Main file for the XML sitemap engines test.
*/
use Drupal\Core\Url;
/**
* Implements hook_xmlsitemap_engine_info().
*/
function xmlsitemap_engines_test_xmlsitemap_engine_info() {
$engines['simpletest'] = [
'name' => t('SimpleTest'),
'url' => 'http://example.com/',
];
return $engines;
}
/**
* Implements hook_xmlsitemap_engine_info_alter().
*/
function xmlsitemap_engines_test_xmlsitemap_engine_info_alter(&$engines) {
$engines['simpletest']['url'] = Url::fromUri('internal:/ping', [
'absolute' => TRUE,
'query' => [
'sitemap' => '',
],
])
->toString() . '[sitemap]';
}
Functions
Name | Description |
---|---|
xmlsitemap_engines_test_xmlsitemap_engine_info | Implements hook_xmlsitemap_engine_info(). |
xmlsitemap_engines_test_xmlsitemap_engine_info_alter | Implements hook_xmlsitemap_engine_info_alter(). |