Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542
This commit is contained in:
parent
3b2511d96d
commit
81ccda77eb
2155 changed files with 54307 additions and 46870 deletions
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
namespace Drupal\language\Config;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
|
||||
/**
|
||||
* Provides a common trait for working with language override collection names.
|
||||
*/
|
||||
|
|
@ -45,7 +43,7 @@ trait LanguageConfigCollectionNameTrait {
|
|||
protected function getLangcodeFromCollectionName($collection) {
|
||||
preg_match('/^language\.(.*)$/', $collection, $matches);
|
||||
if (!isset($matches[1])) {
|
||||
throw new \InvalidArgumentException(SafeMarkup::format('!collection is not a valid language override collection', array('!collection' => $collection)));
|
||||
throw new \InvalidArgumentException("'$collection' is not a valid language override collection");
|
||||
}
|
||||
return $matches[1];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
namespace Drupal\language\Config;
|
||||
|
||||
use Drupal\Core\Cache\CacheableMetadata;
|
||||
use Drupal\Core\Config\ConfigCollectionInfo;
|
||||
use Drupal\Core\Config\ConfigCrudEvent;
|
||||
use Drupal\Core\Config\ConfigFactoryOverrideBase;
|
||||
|
|
@ -222,4 +223,15 @@ class LanguageConfigFactoryOverride extends ConfigFactoryOverrideBase implements
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCacheableMetadata($name) {
|
||||
$metadata = new CacheableMetadata();
|
||||
if ($this->language) {
|
||||
$metadata->setCacheContexts(['languages:language_interface']);
|
||||
}
|
||||
return $metadata;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue