Mercurial > hg > isophonics-drupal-site
comparison core/modules/language/src/Entity/ConfigurableLanguage.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
comparison
equal
deleted
inserted
replaced
17:129ea1e6d783 | 18:af1871eacc83 |
---|---|
37 * entity_keys = { | 37 * entity_keys = { |
38 * "id" = "id", | 38 * "id" = "id", |
39 * "label" = "label", | 39 * "label" = "label", |
40 * "weight" = "weight" | 40 * "weight" = "weight" |
41 * }, | 41 * }, |
42 * config_export = { | |
43 * "id", | |
44 * "label", | |
45 * "direction", | |
46 * "weight", | |
47 * "locked" | |
48 * }, | |
42 * links = { | 49 * links = { |
43 * "delete-form" = "/admin/config/regional/language/delete/{configurable_language}", | 50 * "delete-form" = "/admin/config/regional/language/delete/{configurable_language}", |
44 * "edit-form" = "/admin/config/regional/language/edit/{configurable_language}", | 51 * "edit-form" = "/admin/config/regional/language/edit/{configurable_language}", |
45 * "collection" = "/admin/config/regional/language", | 52 * "collection" = "/admin/config/regional/language", |
46 * } | 53 * } |
150 if (!$this->isLocked() && !$update) { | 157 if (!$this->isLocked() && !$update) { |
151 // Add language to the list of language domains. | 158 // Add language to the list of language domains. |
152 $config = \Drupal::configFactory()->getEditable('language.negotiation'); | 159 $config = \Drupal::configFactory()->getEditable('language.negotiation'); |
153 $domains = $config->get('url.domains'); | 160 $domains = $config->get('url.domains'); |
154 $domains[$this->id()] = ''; | 161 $domains[$this->id()] = ''; |
155 $config->set('url.domains', $domains)->save(); | 162 $config->set('url.domains', $domains)->save(TRUE); |
156 } | 163 } |
157 } | 164 } |
158 | 165 |
159 /** | 166 /** |
160 * {@inheritdoc} | 167 * {@inheritdoc} |
191 | 198 |
192 // Remove language from language prefix and domain list. | 199 // Remove language from language prefix and domain list. |
193 $config = \Drupal::configFactory()->getEditable('language.negotiation'); | 200 $config = \Drupal::configFactory()->getEditable('language.negotiation'); |
194 $config->clear('url.prefixes.' . $entity->id()); | 201 $config->clear('url.prefixes.' . $entity->id()); |
195 $config->clear('url.domains.' . $entity->id()); | 202 $config->clear('url.domains.' . $entity->id()); |
196 $config->save(); | 203 $config->save(TRUE); |
197 } | 204 } |
198 | 205 |
199 /** | 206 /** |
200 * Gets the default langcode. | 207 * Gets the default langcode. |
201 * | 208 * |