Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -13,13 +13,13 @@ use Drupal\Core\Language\Language;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Plugin\PluginBase;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Routing\RouteProviderInterface;
use Drupal\Core\StringTranslation\TranslationInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Url;
use Drupal\locale\LocaleConfigManager;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
@ -371,13 +371,8 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con
/**
* {@inheritdoc}
*/
public function populateFromRequest(Request $request) {
if ($request->attributes->has('langcode')) {
$this->langcode = $request->attributes->get('langcode');
}
else {
$this->langcode = NULL;
}
public function populateFromRouteMatch(RouteMatchInterface $route_match) {
$this->langcode = $route_match->getParameter('langcode');
}
/**
@ -407,6 +402,14 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con
return reset($langcodes);
}
/**
* {@inheritdoc}
*/
public function setLangcode($langcode) {
$this->langcode = $langcode;
return $this;
}
/**
* {@inheritdoc}
*/
@ -435,11 +438,11 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con
*/
public function hasTranslatable() {
foreach ($this->getConfigNames() as $name) {
if (!$this->configMapperManager->hasTranslatable($name)) {
return FALSE;
if ($this->configMapperManager->hasTranslatable($name)) {
return TRUE;
}
}
return TRUE;
return FALSE;
}
/**