class CustomLinkGenerator in Simple XML sitemap 8
CustomLinkGenerator class.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\simplesitemap\LinkGeneratorBase implements LinkGeneratorInterface
- class \Drupal\simplesitemap\CustomLinkGenerator
- class \Drupal\simplesitemap\LinkGeneratorBase implements LinkGeneratorInterface
Expanded class hierarchy of CustomLinkGenerator
File
- src/
CustomLinkGenerator.php, line 14 - Contains \Drupal\simplesitemap\LinkGenerators\CustomLinkGenerator.
Namespace
Drupal\simplesitemapView source
class CustomLinkGenerator extends LinkGeneratorBase {
/**
* Returns an array of all urls of the custom paths.
*
* @param array $custom_paths
*
* @return array $urls
*
*/
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CustomLinkGenerator:: |
public | function |
Returns an array of all urls of the custom paths. Overrides LinkGeneratorBase:: |
|
LinkGeneratorBase:: |
private | property | ||
LinkGeneratorBase:: |
private | property | ||
LinkGeneratorBase:: |
protected | property | ||
LinkGeneratorBase:: |
private | property | ||
LinkGeneratorBase:: |
protected | property | ||
LinkGeneratorBase:: |
protected | function | Checks if anonymous users have access to a given path. | |
LinkGeneratorBase:: |
constant | |||
LinkGeneratorBase:: |
public | function |
Overrides LinkGeneratorInterface:: |
|
LinkGeneratorBase:: |
protected | function | Wrapper function for Drupal\Core\Url::fromRoute. Returns url data for every language. | |
LinkGeneratorBase:: |
protected | function | Wrapper function for Drupal\Core\Url::fromUserInput. Returns url data for every language. | |
LinkGeneratorBase:: |
constant | |||
LinkGeneratorBase:: |
constant | |||
LinkGeneratorBase:: |
protected | function | Logs and displays an error. | |
LinkGeneratorBase:: |
function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
||
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. |