public function SitemapBase::setConfiguration in Sitemap 2.0.x
Same name and namespace in other branches
- 8.2 src/SitemapBase.php \Drupal\sitemap\SitemapBase::setConfiguration()
Sets the configuration for this plugin instance.
Parameters
array $configuration: An associative array containing the plugin's configuration.
Overrides ConfigurableInterface::setConfiguration
1 call to SitemapBase::setConfiguration()
- SitemapBase::__construct in src/
SitemapBase.php - Constructs a \Drupal\Component\Plugin\PluginBase object.
File
- src/
SitemapBase.php, line 127
Class
- SitemapBase
- Base class for Sitemap plugin implementations.
Namespace
Drupal\sitemapCode
public function setConfiguration(array $configuration) {
if (isset($configuration['enabled'])) {
$this->enabled = (bool) $configuration['enabled'];
}
if (isset($configuration['weight'])) {
$this->weight = (int) $configuration['weight'];
}
if (isset($configuration['settings'])) {
$this->settings = (array) $configuration['settings'];
}
return $this;
}