public function InsertView::setConfiguration in Advanced Insert View 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Filter/InsertView.php \Drupal\insert_view_adv\Plugin\Filter\InsertView::setConfiguration()
Sets the configuration for this plugin instance.
Parameters
array $configuration: An associative array containing the plugin's configuration.
Overrides FilterBase::setConfiguration
File
- src/
Plugin/ Filter/ InsertView.php, line 261
Class
- InsertView
- Provides a filter for insert view.
Namespace
Drupal\insert_view_adv\Plugin\FilterCode
public function setConfiguration(array $configuration) {
// Filter out "allowed_views" options that are not actually selected.
// Otherwise, they are exported as part of the filter configuration even if
// the text format does not use the insert_view_adv filter. They are also
// rendered per views insert as part of the cache_render entry since each
// enabled view on the site gets an entry in the filter plugin settings.
if (!empty($configuration['settings']['allowed_views'])) {
$configuration['settings']['allowed_views'] = array_filter($configuration['settings']['allowed_views']);
}
parent::setConfiguration($configuration);
}