diff --git a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php index 765d955..e0dd16a 100644 --- a/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php +++ b/core/lib/Drupal/Core/FileTransfer/Form/FileTransferAuthorizeForm.php @@ -48,7 +48,7 @@ public function buildForm(array $form, array &$form_state) { if (isset($form_state['values']['connection_settings']['authorize_filetransfer_default'])) { $authorize_filetransfer_default = $form_state['values']['connection_settings']['authorize_filetransfer_default']; } - elseif ($authorize_filetransfer_default = $this->config('system.authorize')->get('filetransfer_default')); + elseif ($authorize_filetransfer_default = $this->rawConfig('system.authorize')->get('filetransfer_default')); else { $authorize_filetransfer_default = key($available_backends); } @@ -197,9 +197,9 @@ public function submitForm(array &$form, array &$form_state) { } } // Set this one as the default authorize method. - $this->config('system.authorize')->set('filetransfer_default', $filetransfer_backend); + $this->rawConfig('system.authorize')->set('filetransfer_default', $filetransfer_backend); // Save the connection settings minus the password. - $this->config('system.authorize')->set('filetransfer_connection_settings_' . $filetransfer_backend, $connection_settings); + $this->rawConfig('system.authorize')->set('filetransfer_connection_settings_' . $filetransfer_backend, $connection_settings); $filetransfer = $this->getFiletransfer($filetransfer_backend, $form_state['values']['connection_settings'][$filetransfer_backend]); @@ -259,7 +259,7 @@ protected function getFiletransfer($backend, $settings = array()) { * @see hook_filetransfer_backends() */ protected function addConnectionSettings($backend) { - $auth_connection_config = $this->config('system.authorize')->get('filetransfer_connection_settings_' . $backend); + $auth_connection_config = $this->rawConfig('system.authorize')->get('filetransfer_connection_settings_' . $backend); $defaults = $auth_connection_config ? $auth_connection_config : array(); $form = array(); diff --git a/core/lib/Drupal/Core/Form/ConfigFormBase.php b/core/lib/Drupal/Core/Form/ConfigFormBase.php index 8ed7403..546a45f 100644 --- a/core/lib/Drupal/Core/Form/ConfigFormBase.php +++ b/core/lib/Drupal/Core/Form/ConfigFormBase.php @@ -61,12 +61,22 @@ public function submitForm(array &$form, array &$form_state) { /** * {@inheritdoc} - * - * Overrides \Drupal\Core\Form\FormBase::config() so that configuration is - * returned override free. This ensures that overrides do not pollute saved - * configuration. */ protected function config($name) { + throw new \Exception('Calling config() directly in configuration forms is forbidden. Call rawConfig() or liveConfig() instead.'); + } + + /** + * Provides configuration access without overrides. + * + * Ensures that overrides do not pollute saved configuration. + * + * @param string $name + * The name of the configuration object to retrieve. + * @return \Drupal\Core\Config\Config + * A configuration object with raw configuration data. + */ + protected function rawConfig($name) { $config_factory = $this->configFactory(); $old_state = $config_factory->getOverrideState(); $config_factory->setOverrideState(FALSE); @@ -75,4 +85,21 @@ protected function config($name) { return $config; } + /** + * Provides configuration access with overrides. + * + * Use to access live configuration for how the form is built or how it + * behaves on validation/submission. For data edited in the form, use the + * rawConfig() method instead. + * + * @param string $name + * The name of the configuration object to retrieve. + * @return \Drupal\Core\Config\Config + * A configuration object with live configuration data (may contain + * overrides). + */ + protected function liveConfig($name) { + return parent::rawConfig($name); + } + } diff --git a/core/lib/Drupal/Core/Form/FormBase.php b/core/lib/Drupal/Core/Form/FormBase.php index 5dedf6c..dc316ef 100644 --- a/core/lib/Drupal/Core/Form/FormBase.php +++ b/core/lib/Drupal/Core/Form/FormBase.php @@ -97,7 +97,7 @@ public function url($route_name, $route_parameters = array(), $options = array() * @return \Drupal\Core\Config\Config * A configuration object. */ - protected function config($name) { + protected function rawConfig($name) { return $this->configFactory()->get($name); } diff --git a/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php b/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php index e22f5dc..0a82033 100644 --- a/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php +++ b/core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php @@ -175,7 +175,7 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'select', '#title' => $this->t('Default country'), '#empty_value' => '', - '#default_value' => $this->config('system.date')->get('country.default'), + '#default_value' => $this->rawConfig('system.date')->get('country.default'), '#options' => $countries, '#description' => $this->t('Select the default country for the site.'), '#weight' => 0, @@ -237,12 +237,12 @@ public function validateForm(array &$form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('system.site') + $this->rawConfig('system.site') ->set('name', $form_state['values']['site_name']) ->set('mail', $form_state['values']['site_mail']) ->save(); - $this->config('system.date') + $this->rawConfig('system.date') ->set('timezone.default', $form_state['values']['date_default_timezone']) ->set('country.default', $form_state['values']['site_default_country']) ->save(); @@ -256,7 +256,7 @@ public function submitForm(array &$form, array &$form_state) { if ($form_state['values']['update_status_module'][2]) { // Reset the configuration factory so it is updated with the new module. $this->resetConfigFactory(); - $this->config('update.settings')->set('notification.emails', array($form_state['values']['account']['mail']))->save(); + $this->rawConfig('update.settings')->set('notification.emails', array($form_state['values']['account']['mail']))->save(); } } diff --git a/core/modules/aggregator/src/Form/SettingsForm.php b/core/modules/aggregator/src/Form/SettingsForm.php index 075b614..efe634f 100644 --- a/core/modules/aggregator/src/Form/SettingsForm.php +++ b/core/modules/aggregator/src/Form/SettingsForm.php @@ -99,7 +99,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('aggregator.settings'); + $config = $this->rawConfig('aggregator.settings'); // Global aggregator settings. $form['aggregator_allowed_html_tags'] = array( @@ -200,7 +200,7 @@ public function validateForm(array &$form, array &$form_state) { */ public function submitForm(array &$form, array &$form_state) { parent::submitForm($form, $form_state); - $config = $this->config('aggregator.settings'); + $config = $this->rawConfig('aggregator.settings'); // Let active plugins save their settings. foreach ($this->configurableInstances as $instance) { $instance->submitConfigurationForm($form, $form_state); diff --git a/core/modules/block/custom_block/src/CustomBlockForm.php b/core/modules/block/custom_block/src/CustomBlockForm.php index f495c4f..a20c813 100644 --- a/core/modules/block/custom_block/src/CustomBlockForm.php +++ b/core/modules/block/custom_block/src/CustomBlockForm.php @@ -212,7 +212,7 @@ public function save(array $form, array &$form_state) { $form_state['id'] = $block->id(); if ($insert) { if (!$theme = $block->getTheme()) { - $theme = $this->config('system.theme')->get('default'); + $theme = $this->rawConfig('system.theme')->get('default'); } $form_state['redirect_route'] = array( 'route_name' => 'block.admin_add', diff --git a/core/modules/block/src/BlockForm.php b/core/modules/block/src/BlockForm.php index 1249dab..7574db3 100644 --- a/core/modules/block/src/BlockForm.php +++ b/core/modules/block/src/BlockForm.php @@ -72,7 +72,7 @@ public function form(array $form, array &$form_state) { // Store theme settings in $form_state for use below. if (!$theme = $entity->get('theme')) { - $theme = $this->config('system.theme')->get('default'); + $theme = $this->rawConfig('system.theme')->get('default'); } $form_state['block_theme'] = $theme; diff --git a/core/modules/book/src/Form/BookSettingsForm.php b/core/modules/book/src/Form/BookSettingsForm.php index 140f8e5..4a9b267 100644 --- a/core/modules/book/src/Form/BookSettingsForm.php +++ b/core/modules/book/src/Form/BookSettingsForm.php @@ -26,7 +26,7 @@ public function getFormId() { */ public function buildForm(array $form, array &$form_state) { $types = node_type_get_names(); - $config = $this->config('book.settings'); + $config = $this->rawConfig('book.settings'); $form['book_allowed_types'] = array( '#type' => 'checkboxes', '#title' => $this->t('Content types allowed in book outlines'), @@ -68,7 +68,7 @@ public function submitForm(array &$form, array &$form_state) { // that we can save them in the correct order if node type changes. // @see book_node_type_update(). sort($allowed_types); - $this->config('book.settings') + $this->rawConfig('book.settings') // Remove unchecked types. ->set('allowed_types', $allowed_types) ->set('child_type', $form_state['values']['book_child_type']) diff --git a/core/modules/comment/src/CommentForm.php b/core/modules/comment/src/CommentForm.php index 01af9bb..67ea988 100644 --- a/core/modules/comment/src/CommentForm.php +++ b/core/modules/comment/src/CommentForm.php @@ -146,7 +146,7 @@ public function form(array $form, array &$form_state) { ); if ($is_admin) { $form['author']['name']['#title'] = $this->t('Authored by'); - $form['author']['name']['#description'] = $this->t('Leave blank for %anonymous.', array('%anonymous' => $this->config('user.settings')->get('anonymous'))); + $form['author']['name']['#description'] = $this->t('Leave blank for %anonymous.', array('%anonymous' => $this->rawConfig('user.settings')->get('anonymous'))); $form['author']['name']['#autocomplete_route_name'] = 'user.autocomplete'; } elseif ($this->currentUser->isAuthenticated()) { @@ -323,7 +323,7 @@ public function submit(array $form, array &$form_state) { // If the comment was posted by an anonymous user and no author name was // required, use "Anonymous" by default. if ($comment->is_anonymous && (!isset($author_name) || $author_name === '')) { - $comment->setAuthorName($this->config('user.settings')->get('anonymous')); + $comment->setAuthorName($this->rawConfig('user.settings')->get('anonymous')); } // Validate the comment's subject. If not specified, extract from comment diff --git a/core/modules/config/src/Form/ConfigSingleImportForm.php b/core/modules/config/src/Form/ConfigSingleImportForm.php index 35b6ee6..98c2c3e 100644 --- a/core/modules/config/src/Form/ConfigSingleImportForm.php +++ b/core/modules/config/src/Form/ConfigSingleImportForm.php @@ -221,7 +221,7 @@ public function validateForm(array &$form, array &$form_state) { } } else { - $config = $this->config($form_state['values']['config_name']); + $config = $this->rawConfig($form_state['values']['config_name']); $this->configExists = !$config->isNew() ? $config : FALSE; } @@ -242,7 +242,7 @@ public function submitForm(array &$form, array &$form_state) { // If a simple configuration file was added, set the data and save. if ($this->data['config_type'] === 'system.simple') { - $this->config($this->data['config_name'])->setData($this->data['import'])->save(); + $this->rawConfig($this->data['config_name'])->setData($this->data['import'])->save(); drupal_set_message($this->t('The %name configuration was imported.', array('%name' => $this->data['config_name']))); } // For a config entity, create a new entity and save it. diff --git a/core/modules/contact/src/MessageForm.php b/core/modules/contact/src/MessageForm.php index 401291e..b638ef6 100644 --- a/core/modules/contact/src/MessageForm.php +++ b/core/modules/contact/src/MessageForm.php @@ -228,7 +228,7 @@ public function save(array $form, array &$form_state) { drupal_mail('contact', 'page_autoreply', $sender->getEmail(), $language_interface->id, $params); } - $config = $this->config('contact.settings'); + $config = $this->rawConfig('contact.settings'); $this->flood->register('contact', $config->get('flood.interval')); if (!$message->isPersonal()) { watchdog('contact', '%sender-name (@sender-from) sent an e-mail regarding %category.', array( diff --git a/core/modules/filter/src/FilterFormatFormBase.php b/core/modules/filter/src/FilterFormatFormBase.php index fd9520d..29bb559 100644 --- a/core/modules/filter/src/FilterFormatFormBase.php +++ b/core/modules/filter/src/FilterFormatFormBase.php @@ -49,7 +49,7 @@ public static function create(ContainerInterface $container) { */ public function form(array $form, array &$form_state) { $format = $this->entity; - $is_fallback = ($format->id() == $this->config('filter.settings')->get('fallback_format')); + $is_fallback = ($format->id() == $this->rawConfig('filter.settings')->get('fallback_format')); $form['#tree'] = TRUE; $form['#attached']['library'][] = 'filter/drupal.filter.admin'; @@ -89,7 +89,7 @@ public function form(array $form, array &$form_state) { // If editing an existing text format, pre-select its current permissions. $form['roles']['#default_value'] = array_keys(filter_get_roles_by_format($format)); } - elseif ($admin_role = $this->config('user.settings')->get('admin_role')) { + elseif ($admin_role = $this->rawConfig('user.settings')->get('admin_role')) { // If adding a new text format and the site has an administrative role, // pre-select that role so as to grant administrators access to the new // text format permission by default. diff --git a/core/modules/forum/src/Form/ForumForm.php b/core/modules/forum/src/Form/ForumForm.php index 3592001..b8f995e 100644 --- a/core/modules/forum/src/Form/ForumForm.php +++ b/core/modules/forum/src/Form/ForumForm.php @@ -139,7 +139,7 @@ protected function forumParentSelect($tid, $title) { $parent = 0; } - $vid = $this->config('forum.settings')->get('vocabulary'); + $vid = $this->rawConfig('forum.settings')->get('vocabulary'); // @todo Inject a taxonomy service when one exists. $children = taxonomy_get_tree($vid, $tid, NULL, TRUE); diff --git a/core/modules/forum/src/Form/Overview.php b/core/modules/forum/src/Form/Overview.php index ce666bf..da4fd55 100644 --- a/core/modules/forum/src/Form/Overview.php +++ b/core/modules/forum/src/Form/Overview.php @@ -61,7 +61,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $forum_config = $this->config('forum.settings'); + $forum_config = $this->rawConfig('forum.settings'); $vid = $forum_config->get('vocabulary'); $vocabulary = $this->entityManager->getStorage('taxonomy_vocabulary')->load($vid); if (!$vocabulary) { diff --git a/core/modules/forum/src/ForumSettingsForm.php b/core/modules/forum/src/ForumSettingsForm.php index dbe486f..b9a7dc2 100644 --- a/core/modules/forum/src/ForumSettingsForm.php +++ b/core/modules/forum/src/ForumSettingsForm.php @@ -25,7 +25,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('forum.settings'); + $config = $this->rawConfig('forum.settings'); $options = array(5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 80, 100, 150, 200, 250, 300, 350, 400, 500); $form['forum_hot_topic'] = array( @@ -64,7 +64,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('forum.settings') + $this->rawConfig('forum.settings') ->set('topics.hot_threshold', $form_state['values']['forum_hot_topic']) ->set('topics.page_limit', $form_state['values']['forum_per_page']) ->set('topics.order', $form_state['values']['forum_order']) diff --git a/core/modules/language/src/Form/ContentLanguageSettingsForm.php b/core/modules/language/src/Form/ContentLanguageSettingsForm.php index 4738a18..1987219 100644 --- a/core/modules/language/src/Form/ContentLanguageSettingsForm.php +++ b/core/modules/language/src/Form/ContentLanguageSettingsForm.php @@ -147,7 +147,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $config = $this->config('language.settings'); + $config = $this->rawConfig('language.settings'); foreach ($form_state['values']['settings'] as $entity_type => $entity_settings) { foreach ($entity_settings as $bundle => $bundle_settings) { $config->set(language_get_default_configuration_settings_key($entity_type, $bundle), array( diff --git a/core/modules/language/src/Form/NegotiationBrowserForm.php b/core/modules/language/src/Form/NegotiationBrowserForm.php index f82e54a..05e84c6 100644 --- a/core/modules/language/src/Form/NegotiationBrowserForm.php +++ b/core/modules/language/src/Form/NegotiationBrowserForm.php @@ -170,7 +170,7 @@ public function validateForm(array &$form, array &$form_state) { public function submitForm(array &$form, array &$form_state) { $mappings = $form_state['mappings']; if (!empty($mappings)) { - $config = $this->config('language.mappings'); + $config = $this->rawConfig('language.mappings'); $config->setData($mappings); $config->save(); } @@ -186,7 +186,7 @@ public function submitForm(array &$form, array &$form_state) { * The browser's langcode mapping configuration array. */ protected function language_get_browser_drupal_langcode_mappings() { - $config = $this->config('language.mappings'); + $config = $this->rawConfig('language.mappings'); if ($config->isNew()) { return array(); } diff --git a/core/modules/language/src/Form/NegotiationConfigureForm.php b/core/modules/language/src/Form/NegotiationConfigureForm.php index a6d241f..8e58462 100644 --- a/core/modules/language/src/Form/NegotiationConfigureForm.php +++ b/core/modules/language/src/Form/NegotiationConfigureForm.php @@ -151,7 +151,7 @@ public function submitForm(array &$form, array &$form_state) { } $method_weights_type[$type] = $method_weights; - $this->config('language.types')->set('negotiation.' . $type . '.method_weights', $method_weights_input)->save(); + $this->rawConfig('language.types')->set('negotiation.' . $type . '.method_weights', $method_weights_input)->save(); } // Update non-configurable language types and the related language @@ -213,8 +213,8 @@ protected function configureFormTable(array &$form, $type) { } $negotiation_info = $form['#language_negotiation_info']; - $enabled_methods = $this->config('language.types')->get('negotiation.' . $type . '.enabled') ?: array(); - $methods_weight = $this->config('language.types')->get('negotiation.' . $type . '.method_weights') ?: array(); + $enabled_methods = $this->rawConfig('language.types')->get('negotiation.' . $type . '.enabled') ?: array(); + $methods_weight = $this->rawConfig('language.types')->get('negotiation.' . $type . '.method_weights') ?: array(); // Add missing data to the methods lists. foreach ($negotiation_info as $method_id => $method) { diff --git a/core/modules/language/src/Form/NegotiationSelectedForm.php b/core/modules/language/src/Form/NegotiationSelectedForm.php index 14c13f4..22355a2 100644 --- a/core/modules/language/src/Form/NegotiationSelectedForm.php +++ b/core/modules/language/src/Form/NegotiationSelectedForm.php @@ -26,7 +26,7 @@ public function getFormId() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('language.negotiation'); + $config = $this->rawConfig('language.negotiation'); $form['selected_langcode'] = array( '#type' => 'language_select', '#title' => t('Language'), @@ -41,7 +41,7 @@ public function buildForm(array $form, array &$form_state) { * Implements \Drupal\Core\Form\FormInterface::submitForm(). */ public function submitForm(array &$form, array &$form_state) { - $this->config('language.negotiation') + $this->rawConfig('language.negotiation') ->set('selected_langcode', $form_state['values']['selected_langcode']) ->save(); diff --git a/core/modules/language/src/Form/NegotiationSessionForm.php b/core/modules/language/src/Form/NegotiationSessionForm.php index 13936af..96f97ef 100644 --- a/core/modules/language/src/Form/NegotiationSessionForm.php +++ b/core/modules/language/src/Form/NegotiationSessionForm.php @@ -25,7 +25,7 @@ public function getFormId() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('language.negotiation'); + $config = $this->rawConfig('language.negotiation'); $form['language_negotiation_session_param'] = array( '#title' => t('Request/session parameter'), '#type' => 'textfield', @@ -42,7 +42,7 @@ public function buildForm(array $form, array &$form_state) { * Implements \Drupal\Core\Form\FormInterface::submitForm(). */ public function submitForm(array &$form, array &$form_state) { - $this->config('language.settings') + $this->rawConfig('language.settings') ->set('session.parameter', $form_state['values']['language_negotiation_session_param']) ->save(); diff --git a/core/modules/language/src/Form/NegotiationUrlForm.php b/core/modules/language/src/Form/NegotiationUrlForm.php index d8c2490..7949ee3 100644 --- a/core/modules/language/src/Form/NegotiationUrlForm.php +++ b/core/modules/language/src/Form/NegotiationUrlForm.php @@ -27,7 +27,7 @@ public function getFormId() { */ public function buildForm(array $form, array &$form_state) { global $base_url; - $config = $this->config('language.negotiation'); + $config = $this->rawConfig('language.negotiation'); $form['language_negotiation_url_part'] = array( '#title' => t('Part of the URL that determines language'), @@ -162,7 +162,7 @@ public function validateForm(array &$form, array &$form_state) { */ public function submitForm(array &$form, array &$form_state) { // Save selected format (prefix or domain). - $this->config('language.negotiation') + $this->rawConfig('language.negotiation') ->set('url.source', $form_state['values']['language_negotiation_url_part']) ->save(); diff --git a/core/modules/locale/src/Form/ExportForm.php b/core/modules/locale/src/Form/ExportForm.php index 433c8c9..851072b 100644 --- a/core/modules/locale/src/Form/ExportForm.php +++ b/core/modules/locale/src/Form/ExportForm.php @@ -154,7 +154,7 @@ public function submitForm(array &$form, array &$form_state) { if (!empty($item)) { $uri = tempnam('temporary://', 'po_'); $header = $reader->getHeader(); - $header->setProjectName($this->config('system.site')->get('name')); + $header->setProjectName($this->rawConfig('system.site')->get('name')); $header->setLanguageName($languageName); $writer = new PoStreamWriter; diff --git a/core/modules/locale/src/Form/LocaleSettingsForm.php b/core/modules/locale/src/Form/LocaleSettingsForm.php index 5bc2968..41bcc33 100644 --- a/core/modules/locale/src/Form/LocaleSettingsForm.php +++ b/core/modules/locale/src/Form/LocaleSettingsForm.php @@ -24,7 +24,7 @@ public function getFormId() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('locale.settings'); + $config = $this->rawConfig('locale.settings'); $form['update_interval_days'] = array( '#type' => 'radios', @@ -97,7 +97,7 @@ public function validateForm(array &$form, array &$form_state) { public function submitForm(array &$form, array &$form_state) { $values = $form_state['values']; - $config = $this->config('locale.settings'); + $config = $this->rawConfig('locale.settings'); $config->set('translation.update_interval_days', $values['update_interval_days'])->save(); $config->set('translation.use_source', $values['use_source'])->save(); diff --git a/core/modules/menu_ui/src/MenuSettingsForm.php b/core/modules/menu_ui/src/MenuSettingsForm.php index 73bc7d7..9b104c8 100644 --- a/core/modules/menu_ui/src/MenuSettingsForm.php +++ b/core/modules/menu_ui/src/MenuSettingsForm.php @@ -25,7 +25,7 @@ public function getFormId() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('menu_ui.settings'); + $config = $this->rawConfig('menu_ui.settings'); $form['intro'] = array( '#type' => 'item', '#markup' => t('The Menu UI module allows on-the-fly creation of menu links in the content authoring forms. To configure these settings for a particular content type, visit the Content types page, click the edit link for the content type, and go to the Menu settings section.', array('@content-types' => url('admin/structure/types'))), @@ -61,7 +61,7 @@ public function buildForm(array $form, array &$form_state) { * Implements \Drupal\Core\Form\FormInterface::submitForm(). */ public function submitForm(array &$form, array &$form_state) { - $this->config('menu_ui.settings') + $this->rawConfig('menu_ui.settings') ->set('main_links', $form_state['values']['menu_main_links_source']) ->set('secondary_links', $form_state['values']['menu_secondary_links_source']) ->save(); diff --git a/core/modules/simpletest/src/Form/SimpletestSettingsForm.php b/core/modules/simpletest/src/Form/SimpletestSettingsForm.php index 563b05d..12727e8 100644 --- a/core/modules/simpletest/src/Form/SimpletestSettingsForm.php +++ b/core/modules/simpletest/src/Form/SimpletestSettingsForm.php @@ -25,7 +25,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('simpletest.settings'); + $config = $this->rawConfig('simpletest.settings'); $form['general'] = array( '#type' => 'details', '#title' => $this->t('General'), @@ -87,7 +87,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function validateForm(array &$form, array &$form_state) { - $config = $this->config('simpletest.settings'); + $config = $this->rawConfig('simpletest.settings'); // If a username was provided but a password wasn't, preserve the existing // password. if (!empty($form_state['values']['simpletest_httpauth_username']) && empty($form_state['values']['simpletest_httpauth_password'])) { @@ -107,7 +107,7 @@ public function validateForm(array &$form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('simpletest.settings') + $this->rawConfig('simpletest.settings') ->set('clear_results', $form_state['values']['simpletest_clear_results']) ->set('verbose', $form_state['values']['simpletest_verbose']) ->set('httpauth.method', $form_state['values']['simpletest_httpauth_method']) diff --git a/core/modules/statistics/src/StatisticsSettingsForm.php b/core/modules/statistics/src/StatisticsSettingsForm.php index c002590..6f158f0 100644 --- a/core/modules/statistics/src/StatisticsSettingsForm.php +++ b/core/modules/statistics/src/StatisticsSettingsForm.php @@ -58,7 +58,7 @@ public function getFormId() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('statistics.settings'); + $config = $this->rawConfig('statistics.settings'); // Content counter settings. $form['content'] = array( @@ -80,7 +80,7 @@ public function buildForm(array $form, array &$form_state) { * Implements \Drupal\Core\Form\FormInterface::submitForm(). */ public function submitForm(array &$form, array &$form_state) { - $this->config('statistics.settings') + $this->rawConfig('statistics.settings') ->set('count_content_views', $form_state['values']['statistics_count_content_views']) ->save(); diff --git a/core/modules/system/src/Form/CronForm.php b/core/modules/system/src/Form/CronForm.php index 43a3013..32d42b1 100644 --- a/core/modules/system/src/Form/CronForm.php +++ b/core/modules/system/src/Form/CronForm.php @@ -71,7 +71,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('system.cron'); + $config = $this->rawConfig('system.cron'); $form['description'] = array( '#markup' => '

' . t('Cron takes care of running periodic tasks like checking for updates and indexing content for search.') . '

', @@ -112,7 +112,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('system.cron') + $this->rawConfig('system.cron') ->set('threshold.autorun', $form_state['values']['cron_safe_threshold']) ->save(); diff --git a/core/modules/system/src/Form/FileSystemForm.php b/core/modules/system/src/Form/FileSystemForm.php index 281bab5..9a398a7 100644 --- a/core/modules/system/src/Form/FileSystemForm.php +++ b/core/modules/system/src/Form/FileSystemForm.php @@ -26,7 +26,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('system.file'); + $config = $this->rawConfig('system.file'); $form['file_public_path'] = array( '#type' => 'item', '#title' => t('Public file system path'), @@ -86,7 +86,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $config = $this->config('system.file') + $config = $this->rawConfig('system.file') ->set('path.private', $form_state['values']['file_private_path']) ->set('path.temporary', $form_state['values']['file_temporary_path']) ->set('temporary_maximum_age', $form_state['values']['temporary_maximum_age']); diff --git a/core/modules/system/src/Form/ImageToolkitForm.php b/core/modules/system/src/Form/ImageToolkitForm.php index be00cd8..1bde9e5 100644 --- a/core/modules/system/src/Form/ImageToolkitForm.php +++ b/core/modules/system/src/Form/ImageToolkitForm.php @@ -61,7 +61,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $current_toolkit = $this->config('system.image')->get('toolkit'); + $current_toolkit = $this->rawConfig('system.image')->get('toolkit'); $form['image_toolkit'] = array( '#type' => 'radios', @@ -96,7 +96,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('system.image') + $this->rawConfig('system.image') ->set('toolkit', $form_state['values']['image_toolkit']) ->save(); diff --git a/core/modules/system/src/Form/LoggingForm.php b/core/modules/system/src/Form/LoggingForm.php index f52fc6a..befd948 100644 --- a/core/modules/system/src/Form/LoggingForm.php +++ b/core/modules/system/src/Form/LoggingForm.php @@ -25,7 +25,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('system.logging'); + $config = $this->rawConfig('system.logging'); $form['error_level'] = array( '#type' => 'radios', '#title' => t('Error messages to display'), @@ -46,7 +46,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('system.logging') + $this->rawConfig('system.logging') ->set('error_level', $form_state['values']['error_level']) ->save(); diff --git a/core/modules/system/src/Form/PerformanceForm.php b/core/modules/system/src/Form/PerformanceForm.php index 7ab0ec1..0ed75a4 100644 --- a/core/modules/system/src/Form/PerformanceForm.php +++ b/core/modules/system/src/Form/PerformanceForm.php @@ -60,7 +60,7 @@ public function getFormId() { public function buildForm(array $form, array &$form_state) { $form['#attached']['library'][] = 'system/drupal.system'; - $config = $this->config('system.performance'); + $config = $this->rawConfig('system.performance'); $form['clear_cache'] = array( '#type' => 'details', @@ -151,7 +151,7 @@ public function submitForm(array &$form, array &$form_state) { // form submit. $this->renderCache->deleteAll(); - $this->config('system.performance') + $this->rawConfig('system.performance') ->set('cache.page.use_internal', $form_state['values']['cache']) ->set('cache.page.max_age', $form_state['values']['page_cache_maximum_age']) ->set('response.gzip', $form_state['values']['page_compression']) diff --git a/core/modules/system/src/Form/RegionalForm.php b/core/modules/system/src/Form/RegionalForm.php index d361859..caf4421 100644 --- a/core/modules/system/src/Form/RegionalForm.php +++ b/core/modules/system/src/Form/RegionalForm.php @@ -59,7 +59,7 @@ public function getFormId() { */ public function buildForm(array $form, array &$form_state) { $countries = $this->countryManager->getList(); - $system_date = $this->config('system.date'); + $system_date = $this->rawConfig('system.date'); // Date settings: $zones = system_time_zones(); @@ -142,7 +142,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('system.date') + $this->rawConfig('system.date') ->set('country.default', $form_state['values']['site_default_country']) ->set('first_day', $form_state['values']['date_first_day']) ->set('timezone.default', $form_state['values']['date_default_timezone']) diff --git a/core/modules/system/src/Form/RssFeedsForm.php b/core/modules/system/src/Form/RssFeedsForm.php index 4d8fe3a..6c398a3 100644 --- a/core/modules/system/src/Form/RssFeedsForm.php +++ b/core/modules/system/src/Form/RssFeedsForm.php @@ -25,7 +25,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $rss_config = $this->config('system.rss'); + $rss_config = $this->rawConfig('system.rss'); $form['feed_description'] = array( '#type' => 'textarea', '#title' => t('Feed description'), @@ -59,7 +59,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('system.rss') + $this->rawConfig('system.rss') ->set('channel.description', $form_state['values']['feed_description']) ->set('items.limit', $form_state['values']['feed_default_items']) ->set('items.view_mode', $form_state['values']['feed_item_length']) diff --git a/core/modules/system/src/Form/SiteInformationForm.php b/core/modules/system/src/Form/SiteInformationForm.php index 01e0d14..bd6e42f 100644 --- a/core/modules/system/src/Form/SiteInformationForm.php +++ b/core/modules/system/src/Form/SiteInformationForm.php @@ -59,7 +59,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $site_config = $this->config('system.site'); + $site_config = $this->rawConfig('system.site'); $site_mail = $site_config->get('mail'); if (empty($site_mail)) { $site_mail = ini_get('sendmail_from'); @@ -168,7 +168,7 @@ public function validateForm(array &$form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('system.site') + $this->rawConfig('system.site') ->set('name', $form_state['values']['site_name']) ->set('mail', $form_state['values']['site_mail']) ->set('slogan', $form_state['values']['site_slogan']) diff --git a/core/modules/system/src/Form/SiteMaintenanceModeForm.php b/core/modules/system/src/Form/SiteMaintenanceModeForm.php index 7de4e61..f909cef 100644 --- a/core/modules/system/src/Form/SiteMaintenanceModeForm.php +++ b/core/modules/system/src/Form/SiteMaintenanceModeForm.php @@ -57,7 +57,7 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('system.maintenance'); + $config = $this->rawConfig('system.maintenance'); $form['maintenance_mode'] = array( '#type' => 'checkbox', '#title' => t('Put site into maintenance mode'), @@ -77,7 +77,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('system.maintenance') + $this->rawConfig('system.maintenance') ->set('message', $form_state['values']['maintenance_mode_message']) ->save(); diff --git a/core/modules/system/src/Form/ThemeAdminForm.php b/core/modules/system/src/Form/ThemeAdminForm.php index 81aebc7..1f8b13b 100644 --- a/core/modules/system/src/Form/ThemeAdminForm.php +++ b/core/modules/system/src/Form/ThemeAdminForm.php @@ -37,7 +37,7 @@ public function buildForm(array $form, array &$form_state, array $theme_options '#options' => array(0 => $this->t('Default theme')) + $theme_options, '#title' => $this->t('Administration theme'), '#description' => $this->t('Choose "Default theme" to always use the same theme as the rest of the site.'), - '#default_value' => $this->config('system.theme')->get('admin'), + '#default_value' => $this->rawConfig('system.theme')->get('admin'), ); $form['admin_theme']['actions'] = array('#type' => 'actions'); $form['admin_theme']['actions']['submit'] = array( @@ -52,7 +52,7 @@ public function buildForm(array $form, array &$form_state, array $theme_options */ public function submitForm(array &$form, array &$form_state) { drupal_set_message($this->t('The configuration options have been saved.')); - $this->config('system.theme')->set('admin', $form_state['values']['admin_theme'])->save(); + $this->rawConfig('system.theme')->set('admin', $form_state['values']['admin_theme'])->save(); } } diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php index 0d4a10f..69baea4 100644 --- a/core/modules/system/src/Form/ThemeSettingsForm.php +++ b/core/modules/system/src/Form/ThemeSettingsForm.php @@ -376,7 +376,7 @@ public function validateForm(array &$form, array &$form_state) { public function submitForm(array &$form, array &$form_state) { parent::submitForm($form, $form_state); - $config = $this->config($form_state['values']['config_key']); + $config = $this->rawConfig($form_state['values']['config_key']); // Exclude unnecessary elements before saving. form_state_values_clean($form_state); diff --git a/core/modules/system/tests/modules/form_test/src/FormTestArgumentsObject.php b/core/modules/system/tests/modules/form_test/src/FormTestArgumentsObject.php index 3f6703d..38785ac 100644 --- a/core/modules/system/tests/modules/form_test/src/FormTestArgumentsObject.php +++ b/core/modules/system/tests/modules/form_test/src/FormTestArgumentsObject.php @@ -54,7 +54,7 @@ public function validateForm(array &$form, array &$form_state) { */ public function submitForm(array &$form, array &$form_state) { drupal_set_message($this->t('The FormTestArgumentsObject::submitForm() method was used for this form.')); - $this->config('form_test.object') + $this->rawConfig('form_test.object') ->set('bananas', $form_state['values']['bananas']) ->save(); } diff --git a/core/modules/system/tests/modules/form_test/src/FormTestControllerObject.php b/core/modules/system/tests/modules/form_test/src/FormTestControllerObject.php index 6ddc7e0..1a19652 100644 --- a/core/modules/system/tests/modules/form_test/src/FormTestControllerObject.php +++ b/core/modules/system/tests/modules/form_test/src/FormTestControllerObject.php @@ -64,7 +64,7 @@ public function validateForm(array &$form, array &$form_state) { */ public function submitForm(array &$form, array &$form_state) { drupal_set_message($this->t('The FormTestControllerObject::submitForm() method was used for this form.')); - $this->config('form_test.object') + $this->rawConfig('form_test.object') ->set('bananas', $form_state['values']['bananas']) ->save(); } diff --git a/core/modules/system/tests/modules/form_test/src/FormTestObject.php b/core/modules/system/tests/modules/form_test/src/FormTestObject.php index f6cb948..e00102e 100644 --- a/core/modules/system/tests/modules/form_test/src/FormTestObject.php +++ b/core/modules/system/tests/modules/form_test/src/FormTestObject.php @@ -55,7 +55,7 @@ public function validateForm(array &$form, array &$form_state) { */ public function submitForm(array &$form, array &$form_state) { drupal_set_message($this->t('The FormTestObject::submitForm() method was used for this form.')); - $this->config('form_test.object') + $this->rawConfig('form_test.object') ->set('bananas', $form_state['values']['bananas']) ->save(); } diff --git a/core/modules/system/tests/modules/form_test/src/FormTestServiceObject.php b/core/modules/system/tests/modules/form_test/src/FormTestServiceObject.php index 2861600..2203021 100644 --- a/core/modules/system/tests/modules/form_test/src/FormTestServiceObject.php +++ b/core/modules/system/tests/modules/form_test/src/FormTestServiceObject.php @@ -53,7 +53,7 @@ public function validateForm(array &$form, array &$form_state) { */ public function submitForm(array &$form, array &$form_state) { drupal_set_message($this->t('The FormTestServiceObject::submitForm() method was used for this form.')); - $this->config('form_test.object') + $this->rawConfig('form_test.object') ->set('bananas', $form_state['values']['bananas']) ->save(); } diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php index 4ff067a..f5569b3 100644 --- a/core/modules/taxonomy/src/Form/OverviewTerms.php +++ b/core/modules/taxonomy/src/Form/OverviewTerms.php @@ -75,7 +75,7 @@ public function buildForm(array $form, array &$form_state, VocabularyInterface $ $page = $this->getRequest()->query->get('page') ?: 0; // Number of terms per page. - $page_increment = $this->config('taxonomy.settings')->get('terms_per_page_admin'); + $page_increment = $this->rawConfig('taxonomy.settings')->get('terms_per_page_admin'); // Elements shown on this page. $page_entries = 0; // Elements at the root level before this page. diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php index e3b048a..fb7296a 100644 --- a/core/modules/taxonomy/src/TermForm.php +++ b/core/modules/taxonomy/src/TermForm.php @@ -48,7 +48,7 @@ public function form(array $form, array &$form_state) { // numbers of items so we check for taxonomy.settings:override_selector // before loading the full vocabulary. Contrib modules can then intercept // before hook_form_alter to provide scalable alternatives. - if (!$this->config('taxonomy.settings')->get('override_selector')) { + if (!$this->rawConfig('taxonomy.settings')->get('override_selector')) { $parent = array_keys(taxonomy_term_load_parents($term->id())); $children = taxonomy_get_tree($vocabulary->id(), $term->id()); diff --git a/core/modules/update/src/UpdateSettingsForm.php b/core/modules/update/src/UpdateSettingsForm.php index 7fd77d2..be52ac1 100644 --- a/core/modules/update/src/UpdateSettingsForm.php +++ b/core/modules/update/src/UpdateSettingsForm.php @@ -25,7 +25,7 @@ public function getFormId() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('update.settings'); + $config = $this->rawConfig('update.settings'); $form['update_check_frequency'] = array( '#type' => 'radios', @@ -104,7 +104,7 @@ public function validateForm(array &$form, array &$form_state) { * Implements \Drupal\Core\Form\FormInterface::submitForm(). */ public function submitForm(array &$form, array &$form_state) { - $config = $this->config('update.settings'); + $config = $this->rawConfig('update.settings'); // See if the update_check_disabled setting is being changed, and if so, // invalidate all update status data. if ($form_state['values']['update_check_disabled'] != $config->get('check.disabled_extensions')) { diff --git a/core/modules/user/src/AccountSettingsForm.php b/core/modules/user/src/AccountSettingsForm.php index e29bc26..57aaaf0 100644 --- a/core/modules/user/src/AccountSettingsForm.php +++ b/core/modules/user/src/AccountSettingsForm.php @@ -59,9 +59,9 @@ public function getFormId() { * Implements \Drupal\Core\Form\FormInterface::buildForm(). */ public function buildForm(array $form, array &$form_state) { - $config = $this->config('user.settings'); - $mail_config = $this->config('user.mail'); - $site_config = $this->config('system.site'); + $config = $this->rawConfig('user.settings'); + $mail_config = $this->rawConfig('user.mail'); + $site_config = $this->rawConfig('system.site'); // Settings for anonymous users. $form['anonymous_settings'] = array( @@ -410,7 +410,7 @@ public function buildForm(array $form, array &$form_state) { public function submitForm(array &$form, array &$form_state) { parent::submitForm($form, $form_state); - $this->config('user.settings') + $this->rawConfig('user.settings') ->set('anonymous', $form_state['values']['anonymous']) ->set('admin_role', $form_state['values']['user_admin_role']) ->set('register', $form_state['values']['user_register']) @@ -422,7 +422,7 @@ public function submitForm(array &$form, array &$form_state) { ->set('notify.status_blocked', $form_state['values']['user_mail_status_blocked_notify']) ->set('notify.status_canceled', $form_state['values']['user_mail_status_canceled_notify']) ->save(); - $this->config('user.mail') + $this->rawConfig('user.mail') ->set('cancel_confirm.body', $form_state['values']['user_mail_cancel_confirm_body']) ->set('cancel_confirm.subject', $form_state['values']['user_mail_cancel_confirm_subject']) ->set('password_reset.body', $form_state['values']['user_mail_password_reset_body']) @@ -440,7 +440,7 @@ public function submitForm(array &$form, array &$form_state) { ->set('status_canceled.body', $form_state['values']['user_mail_status_canceled_body']) ->set('status_canceled.subject', $form_state['values']['user_mail_status_canceled_subject']) ->save(); - $this->config('system.site') + $this->rawConfig('system.site') ->set('mail_notification', $form_state['values']['mail_notification_address']) ->save(); } diff --git a/core/modules/user/src/Form/UserCancelForm.php b/core/modules/user/src/Form/UserCancelForm.php index c453c76..96ff015 100644 --- a/core/modules/user/src/Form/UserCancelForm.php +++ b/core/modules/user/src/Form/UserCancelForm.php @@ -49,7 +49,7 @@ public function getCancelRoute() { */ public function getDescription() { $description = ''; - $default_method = $this->config('user.settings')->get('cancel_method'); + $default_method = $this->rawConfig('user.settings')->get('cancel_method'); if ($this->currentUser()->hasPermission('administer users') || $this->currentUser()->hasPermission('select account cancellation method')) { $description = $this->t('Select the method to cancel the account above.'); } @@ -96,7 +96,7 @@ public function buildForm(array $form, array &$form_state) { '#description' => $this->t('When enabled, the user must confirm the account cancellation via e-mail.'), ); // Also allow to send account canceled notification mail, if enabled. - $default_notify = $this->config('user.settings')->get('notify.status_canceled'); + $default_notify = $this->rawConfig('user.settings')->get('notify.status_canceled'); $form['user_cancel_notify'] = array( '#type' => 'checkbox', '#title' => $this->t('Notify user when account is canceled.'), diff --git a/core/modules/user/src/Form/UserLoginForm.php b/core/modules/user/src/Form/UserLoginForm.php index 58e0ba2..6d9ab17 100644 --- a/core/modules/user/src/Form/UserLoginForm.php +++ b/core/modules/user/src/Form/UserLoginForm.php @@ -83,7 +83,7 @@ public function buildForm(array $form, array &$form_state) { '#title' => $this->t('Username'), '#size' => 60, '#maxlength' => USERNAME_MAX_LENGTH, - '#description' => $this->t('Enter your @s username.', array('@s' => $this->config('system.site')->get('name'))), + '#description' => $this->t('Enter your @s username.', array('@s' => $this->rawConfig('system.site')->get('name'))), '#required' => TRUE, '#attributes' => array( 'autocorrect' => 'off', @@ -148,7 +148,7 @@ public function validateName(array &$form, array &$form_state) { */ public function validateAuthentication(array &$form, array &$form_state) { $password = trim($form_state['values']['pass']); - $flood_config = $this->config('user.flood'); + $flood_config = $this->rawConfig('user.flood'); if (!empty($form_state['values']['name']) && !empty($password)) { // Do not allow any login from the current user's IP if the limit has been // reached. Default is 50 failed attempts allowed in one hour. This is @@ -194,7 +194,7 @@ public function validateAuthentication(array &$form, array &$form_state) { * This validation function should always be the last one. */ public function validateFinal(array &$form, array &$form_state) { - $flood_config = $this->config('user.flood'); + $flood_config = $this->rawConfig('user.flood'); if (empty($form_state['uid'])) { // Always register an IP-based failed login event. $this->flood->register('user.failed_login_ip', $flood_config->get('ip_window')); diff --git a/core/modules/user/src/Form/UserMultipleCancelConfirm.php b/core/modules/user/src/Form/UserMultipleCancelConfirm.php index b0dd621..d111eba 100644 --- a/core/modules/user/src/Form/UserMultipleCancelConfirm.php +++ b/core/modules/user/src/Form/UserMultipleCancelConfirm.php @@ -154,7 +154,7 @@ public function buildForm(array $form, array &$form_state) { '#type' => 'checkbox', '#title' => $this->t('Notify user when account is canceled.'), '#default_value' => FALSE, - '#access' => $this->config('user.settings')->get('notify.status_canceled'), + '#access' => $this->rawConfig('user.settings')->get('notify.status_canceled'), '#description' => $this->t('When enabled, the user will receive an e-mail notification after the account has been canceled.'), ); diff --git a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php index 9ba103d..7b2c831 100644 --- a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php +++ b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php @@ -28,7 +28,7 @@ public function getFormId() { public function buildForm(array $form, array &$form_state) { $form = parent::buildForm($form, $form_state); - $config = $this->config('views.settings'); + $config = $this->rawConfig('views.settings'); $form['cache'] = array( '#type' => 'details', '#title' => $this->t('Caching'), @@ -91,7 +91,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('views.settings') + $this->rawConfig('views.settings') ->set('skip_cache', $form_state['values']['skip_cache']) ->set('sql_signature', $form_state['values']['sql_signature']) ->set('no_javascript', $form_state['values']['no_javascript']) diff --git a/core/modules/views_ui/src/Form/BasicSettingsForm.php b/core/modules/views_ui/src/Form/BasicSettingsForm.php index f898f9a..fd5b7e1 100644 --- a/core/modules/views_ui/src/Form/BasicSettingsForm.php +++ b/core/modules/views_ui/src/Form/BasicSettingsForm.php @@ -27,7 +27,7 @@ public function getFormId() { public function buildForm(array $form, array &$form_state) { $form = parent::buildForm($form, $form_state); - $config = $this->config('views.settings'); + $config = $this->rawConfig('views.settings'); $options = array(); foreach (list_themes() as $name => $theme) { if ($theme->status) { @@ -127,7 +127,7 @@ public function buildForm(array $form, array &$form_state) { * {@inheritdoc} */ public function submitForm(array &$form, array &$form_state) { - $this->config('views.settings') + $this->rawConfig('views.settings') ->set('ui.show.master_display', $form_state['values']['ui_show_master_display']) ->set('ui.show.advanced_column', $form_state['values']['ui_show_advanced_column']) ->set('ui.show.display_embed', $form_state['values']['ui_show_display_embed'])