Commit ac905945 authored by gbyte.co's avatar gbyte.co

Provide default plugin settings

parent 1f9200ae
......@@ -9,7 +9,7 @@ use Drupal\Component\Annotation\Plugin;
*
* @package Drupal\simple_sitemap\Annotation
*
* @see Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorManager
* @see \Drupal\simple_sitemap\Plugin\simple_sitemap\UrlGenerator\UrlGeneratorManager
* @see plugin_api
*
* @Annotation
......@@ -17,14 +17,14 @@ use Drupal\Component\Annotation\Plugin;
class UrlGenerator extends Plugin {
/**
* The plugin ID.
* The generator ID.
*
* @var string
*/
public $id;
/**
* The human-readable name of the plugin.
* The human-readable name of the generator.
*
* @ingroup plugin_translatable
*
......@@ -33,7 +33,7 @@ class UrlGenerator extends Plugin {
public $title;
/**
* A short description of the plugin.
* A short description of the generator.
*
* @ingroup plugin_translatable
*
......@@ -49,16 +49,18 @@ class UrlGenerator extends Plugin {
public $weight = 0;
/**
* Whether this plugin is enabled or disabled by default.
* Whether the generator is enabled by default.
*
* @var bool
*/
public $enabled = TRUE;
/**
* The default settings for the plugin.
* Default generator settings.
*
* @var array
*/
public $settings = [];
public $settings = [
'instantiate_for_each_data_set' => FALSE,
];
}
......@@ -19,10 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* id = "arbitrary",
* title = @Translation("Arbitrary URL generator"),
* description = @Translation("Generates URLs from data sets collected in the hook_arbitrary_links_alter hook."),
* enabled = TRUE,
* weight = 20,
* settings = {
* },
* )
*/
class ArbitraryUrlGenerator extends UrlGeneratorBase {
......
......@@ -21,10 +21,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* id = "custom",
* title = @Translation("Custom URL generator"),
* description = @Translation("Generates URLs set in admin/config/search/simplesitemap/custom."),
* enabled = TRUE,
* weight = 0,
* settings = {
* },
* )
*
*/
......
......@@ -20,7 +20,6 @@ use Drupal\Core\Menu\MenuLinkTree;
* id = "entity_menu_link_content",
* title = @Translation("Menu link URL generator"),
* description = @Translation("Generates menu link URLs by overriding the 'entity' URL generator."),
* enabled = TRUE,
* weight = 5,
* settings = {
* "instantiate_for_each_data_set" = true,
......
......@@ -18,7 +18,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* id = "entity",
* title = @Translation("Entity URL generator"),
* description = @Translation("Generates URLs for entity bundles and bundle overrides."),
* enabled = TRUE,
* weight = 10,
* settings = {
* "instantiate_for_each_data_set" = true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment