function xmlsitemap_xmlsitemap_process_entity_links in XML sitemap 2.x
Same name and namespace in other branches
- 8 xmlsitemap.module \xmlsitemap_xmlsitemap_process_entity_links()
Process sitemap links.
Parameters
string $entity_type_id: The entity type to process.
array $entity_ids: Entity IDs to be processed.
1 string reference to 'xmlsitemap_xmlsitemap_process_entity_links'
- xmlsitemap_get_link_info in ./
xmlsitemap.module - Returns information about supported sitemap link types.
File
- ./
xmlsitemap.module, line 1619 - xmlsitemap XML sitemap
Code
function xmlsitemap_xmlsitemap_process_entity_links($entity_type_id, array $entity_ids) {
/** @var \Drupal\Core\Entity\ContentEntityInterface[] $entities */
$entities = \Drupal::entityTypeManager()
->getStorage($entity_type_id)
->loadMultiple($entity_ids);
foreach ($entities as $entity) {
xmlsitemap_xmlsitemap_process_entity_link($entity);
}
// Reset the entity cache afterwards to clear out some memory.
\Drupal::entityTypeManager()
->getStorage($entity_type_id)
->resetCache();
}