You are here

public function CustomLinkGenerator::get_paths in Simple XML sitemap 8

Returns an array of all urls of the custom paths.

Parameters

array $custom_paths:

Return value

array $urls

Overrides LinkGeneratorBase::get_paths

File

src/CustomLinkGenerator.php, line 24
Contains \Drupal\simplesitemap\LinkGenerators\CustomLinkGenerator.

Class

CustomLinkGenerator
CustomLinkGenerator class.

Namespace

Drupal\simplesitemap

Code

public function get_paths($custom_paths) {
  $paths = array();
  foreach ($custom_paths as $i => $custom_path) {
    if (FALSE !== ($path_data = $this
      ->get_multilang_urls_from_user_input($custom_path['path']))) {
      $paths[$i]['path_data'] = $path_data;
      $paths[$i]['priority'] = isset($custom_path['priority']) ? $custom_path['priority'] : NULL;
      $paths[$i]['lastmod'] = NULL;

      //todo: implement lastmod
    }
  }
  return $paths;
}