public function get_custom_links($custom_paths, $language) { $links = array(); foreach ($custom_paths as $custom_path) { if ($custom_path['index']) { $links[] = SitemapGenerator::add_xml_link_markup(Url::fromUserInput($custom_path['path'], array('language' => $language, 'absolute' => TRUE))->toString(), $custom_path['priority']); } } return $links; }
public function get_entity_links($entity_type, $bundles, $language) { foreach ($bundles as $bundle => $bundle_settings) { if (!$bundle_settings['index']) { continue; } $links = $this->get_entity_bundle_links($entity_type, $bundle, $language); foreach ($links as &$link) { $link = SitemapGenerator::add_xml_link_markup($link, $bundle_settings['priority']); } $this->entity_links = array_merge($this->entity_links, $links); } return $this->entity_links; }