Skip to content
Snippets Groups Projects
Commit 2a48c009 authored by Bevan  Wishart's avatar Bevan Wishart
Browse files

Rename default custom source to dummy custom source

parent c7a542fd
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,6 @@ use Drupal\feeds\Plugin\Type\CustomSource\CustomSourceBase;
* },
* )
*/
class CsvSource extends CustomSourceDefault {
class CsvSource extends DummySource {
}
......@@ -9,15 +9,15 @@ use Drupal\feeds\Plugin\Type\CustomSource\CustomSourceBase;
* A custom source.
*
* @FeedsCustomSource(
* id = "default",
* title = @Translation("Default"),
* id = "dummy",
* title = @Translation("Dummy"),
* parsers = {
* "csv",
* "xml",
* },
* )
*/
class CustomSourceDefault extends CustomSourceBase {
class DummySource extends CustomSourceBase {
/**
* {@inheritdoc}
......
......@@ -117,10 +117,11 @@ abstract class ParserBase extends PluginBase implements ParserInterface, Mapping
}
}
}
// If the plugin hasn't specified custom source support, load the default.
// If the plugin hasn't specified custom source support, load the dummy
// this way we always support 'dummy'.
else {
$custom_source_plugin_definition = $this->customSourcePluginManager->getDefinition('default');
$custom_sources['custom__default'] = $this->t('New @type...', [
$custom_source_plugin_definition = $this->customSourcePluginManager->getDefinition('dummy');
$custom_sources['custom__dummy'] = $this->t('New @type...', [
'@type' => $custom_source_plugin_definition['title'],
]);
}
......
......@@ -69,7 +69,7 @@ class CustomSourceEditForm extends FormBase {
}
$source = $this->feedType->getCustomSource($key);
$source['feed_type'] = $feeds_feed_type;
$type = $source['type'] ?? 'default';
$type = $source['type'] ?? 'dummy';
$plugin = $this->pluginManager->createInstance($type, $source);
$form['source'] = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment