Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542

This commit is contained in:
Pantheon Automation 2015-08-27 12:03:05 -07:00 committed by Greg Anderson
parent 3b2511d96d
commit 81ccda77eb
2155 changed files with 54307 additions and 46870 deletions

View file

@ -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];
}

View file

@ -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;
}
}