Commit 338e9669 authored by alexpott's avatar alexpott

Issue #2328293 by keopx, JeroenT, ianthomas_uk, ashutoshsngh, rpayanm, hudo,...

Issue #2328293 by keopx, JeroenT, ianthomas_uk, ashutoshsngh, rpayanm, hudo, a_thakur: Remove usage of language_list()
parent f98c96a0
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Language\LanguageInterface;
use Drupal\field\FieldStorageConfigInterface; use Drupal\field\FieldStorageConfigInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
...@@ -121,6 +122,13 @@ class SqlContentEntityStorage extends ContentEntityStorageBase implements SqlEnt ...@@ -121,6 +122,13 @@ class SqlContentEntityStorage extends ContentEntityStorageBase implements SqlEnt
*/ */
protected $cacheBackend; protected $cacheBackend;
/**
* The language manager.
*
* @var \Drupal\Core\Language\LanguageManagerInterface
*/
protected $languageManager;
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
...@@ -129,7 +137,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI ...@@ -129,7 +137,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI
$entity_type, $entity_type,
$container->get('database'), $container->get('database'),
$container->get('entity.manager'), $container->get('entity.manager'),
$container->get('cache.entity') $container->get('cache.entity'),
$container->get('language_manager')
); );
} }
...@@ -155,12 +164,15 @@ public function getFieldStorageDefinitions() { ...@@ -155,12 +164,15 @@ public function getFieldStorageDefinitions() {
* The entity manager. * The entity manager.
* @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
* The cache backend to be used. * The cache backend to be used.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/ */
public function __construct(EntityTypeInterface $entity_type, Connection $database, EntityManagerInterface $entity_manager, CacheBackendInterface $cache) { public function __construct(EntityTypeInterface $entity_type, Connection $database, EntityManagerInterface $entity_manager, CacheBackendInterface $cache, LanguageManagerInterface $language_manager) {
parent::__construct($entity_type); parent::__construct($entity_type);
$this->database = $database; $this->database = $database;
$this->entityManager = $entity_manager; $this->entityManager = $entity_manager;
$this->cacheBackend = $cache; $this->cacheBackend = $cache;
$this->languageManager = $language_manager;
$this->initTableLayout(); $this->initTableLayout();
} }
...@@ -1251,7 +1263,7 @@ protected function loadFieldItems(array $entities) { ...@@ -1251,7 +1263,7 @@ protected function loadFieldItems(array $entities) {
} }
// Load field data. // Load field data.
$langcodes = array_keys(language_list(LanguageInterface::STATE_ALL)); $langcodes = array_keys($this->languageManager->getLanguages(LanguageInterface::STATE_ALL));
foreach ($storage_definitions as $field_name => $storage_definition) { foreach ($storage_definitions as $field_name => $storage_definition) {
$table = $load_current ? $table_mapping->getDedicatedDataTableName($storage_definition) : $table_mapping->getDedicatedRevisionTableName($storage_definition); $table = $load_current ? $table_mapping->getDedicatedDataTableName($storage_definition) : $table_mapping->getDedicatedRevisionTableName($storage_definition);
......
...@@ -183,7 +183,7 @@ public function isAnonymous() { ...@@ -183,7 +183,7 @@ public function isAnonymous() {
* {@inheritdoc} * {@inheritdoc}
*/ */
function getPreferredLangcode($fallback_to_default = TRUE) { function getPreferredLangcode($fallback_to_default = TRUE) {
$language_list = language_list(); $language_list = \Drupal::languageManager()->getLanguages();
if (!empty($this->preferred_langcode) && isset($language_list[$this->preferred_langcode])) { if (!empty($this->preferred_langcode) && isset($language_list[$this->preferred_langcode])) {
return $language_list[$this->preferred_langcode]->getId(); return $language_list[$this->preferred_langcode]->getId();
} }
...@@ -196,7 +196,7 @@ function getPreferredLangcode($fallback_to_default = TRUE) { ...@@ -196,7 +196,7 @@ function getPreferredLangcode($fallback_to_default = TRUE) {
* {@inheritdoc} * {@inheritdoc}
*/ */
function getPreferredAdminLangcode($fallback_to_default = TRUE) { function getPreferredAdminLangcode($fallback_to_default = TRUE) {
$language_list = language_list(); $language_list = \Drupal::languageManager()->getLanguages();
if (!empty($this->preferred_admin_langcode) && isset($language_list[$this->preferred_admin_langcode])) { if (!empty($this->preferred_admin_langcode) && isset($language_list[$this->preferred_admin_langcode])) {
return $language_list[$this->preferred_admin_langcode]->getId(); return $language_list[$this->preferred_admin_langcode]->getId();
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Entity\Sql\SqlContentEntityStorage; use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
...@@ -45,9 +46,11 @@ class CommentStorage extends SqlContentEntityStorage implements CommentStorageIn ...@@ -45,9 +46,11 @@ class CommentStorage extends SqlContentEntityStorage implements CommentStorageIn
* Cache backend instance to use. * Cache backend instance to use.
* @param \Drupal\Core\Session\AccountInterface $current_user * @param \Drupal\Core\Session\AccountInterface $current_user
* The current user. * The current user.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/ */
public function __construct(EntityTypeInterface $entity_info, Connection $database, EntityManagerInterface $entity_manager, AccountInterface $current_user, CacheBackendInterface $cache) { public function __construct(EntityTypeInterface $entity_info, Connection $database, EntityManagerInterface $entity_manager, AccountInterface $current_user, CacheBackendInterface $cache, LanguageManagerInterface $language_manager) {
parent::__construct($entity_info, $database, $entity_manager, $cache); parent::__construct($entity_info, $database, $entity_manager, $cache, $language_manager);
$this->currentUser = $current_user; $this->currentUser = $current_user;
} }
...@@ -60,7 +63,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI ...@@ -60,7 +63,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI
$container->get('database'), $container->get('database'),
$container->get('entity.manager'), $container->get('entity.manager'),
$container->get('current_user'), $container->get('current_user'),
$container->get('cache.entity') $container->get('cache.entity'),
$container->get('language_manager')
); );
} }
......
...@@ -242,10 +242,7 @@ function content_translation_translate_access(EntityInterface $entity) { ...@@ -242,10 +242,7 @@ function content_translation_translate_access(EntityInterface $entity) {
* @todo Move to \Drupal\content_translation\ContentTranslationManager. * @todo Move to \Drupal\content_translation\ContentTranslationManager.
*/ */
function content_translation_controller($entity_type_id) { function content_translation_controller($entity_type_id) {
$entity_type = \Drupal::entityManager()->getDefinition($entity_type_id); return \Drupal::entityManager()->getHandler($entity_type_id, 'translation');
// @todo Throw an exception if the key is missing.
$class = $entity_type->getHandlerClass('translation');
return new $class($entity_type);
} }
/** /**
......
...@@ -8,18 +8,21 @@ ...@@ -8,18 +8,21 @@
namespace Drupal\content_translation; namespace Drupal\content_translation;
use Drupal\Core\Access\AccessResult; use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityHandlerInterface;
use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Render\Element; use Drupal\Core\Render\Element;
use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* Base class for content translation handlers. * Base class for content translation handlers.
* *
* @ingroup entity_api * @ingroup entity_api
*/ */
class ContentTranslationHandler implements ContentTranslationHandlerInterface { class ContentTranslationHandler implements ContentTranslationHandlerInterface, EntityHandlerInterface {
/** /**
* The type of the entity being translated. * The type of the entity being translated.
...@@ -35,15 +38,35 @@ class ContentTranslationHandler implements ContentTranslationHandlerInterface { ...@@ -35,15 +38,35 @@ class ContentTranslationHandler implements ContentTranslationHandlerInterface {
*/ */
protected $entityType; protected $entityType;
/**
* The language manager.
*
* @var \Drupal\Core\Language\LanguageManagerInterface
*/
protected $languageManager;
/**
* {@inheritdoc}
*/
public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
return new static(
$entity_type,
$container->get('language_manager')
);
}
/** /**
* Initializes an instance of the content translation controller. * Initializes an instance of the content translation controller.
* *
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The info array of the given entity type. * The info array of the given entity type.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/ */
public function __construct(EntityTypeInterface $entity_type) { public function __construct(EntityTypeInterface $entity_type, LanguageManagerInterface $language_manager) {
$this->entityTypeId = $entity_type->id(); $this->entityTypeId = $entity_type->id();
$this->entityType = $entity_type; $this->entityType = $entity_type;
$this->languageManager = $language_manager;
} }
/** /**
...@@ -104,7 +127,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En ...@@ -104,7 +127,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En
// Adjust page title to specify the current language being edited, if we // Adjust page title to specify the current language being edited, if we
// have at least one translation. // have at least one translation.
$languages = language_list(); $languages = $this->languageManager->getLanguages();
if (isset($languages[$form_langcode]) && ($has_translations || $new_translation)) { if (isset($languages[$form_langcode]) && ($has_translations || $new_translation)) {
$title = $this->entityFormTitle($entity); $title = $this->entityFormTitle($entity);
// When editing the original values display just the entity label. // When editing the original values display just the entity label.
...@@ -137,7 +160,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En ...@@ -137,7 +160,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En
'#submit' => array(array($this, 'entityFormSourceChange')), '#submit' => array(array($this, 'entityFormSourceChange')),
), ),
); );
foreach (language_list(LanguageInterface::STATE_CONFIGURABLE) as $language) { foreach ($this->languageManager->getLanguages() as $language) {
if (isset($translations[$language->getId()])) { if (isset($translations[$language->getId()])) {
$form['source_langcode']['source']['#options'][$language->getId()] = $language->getName(); $form['source_langcode']['source']['#options'][$language->getId()] = $language->getName();
} }
...@@ -158,7 +181,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En ...@@ -158,7 +181,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En
$language_select = &$language_widget['widget'][0]['value']; $language_select = &$language_widget['widget'][0]['value'];
if ($language_select['#type'] == 'language_select') { if ($language_select['#type'] == 'language_select') {
$options = array(); $options = array();
foreach (\Drupal::languageManager()->getLanguages() as $language) { foreach ($this->languageManager->getLanguages() as $language) {
// Show the current language, and the languages for which no // Show the current language, and the languages for which no
// translation already exists. // translation already exists.
if (empty($translations[$language->getId()]) || $language->getId() == $entity_langcode) { if (empty($translations[$language->getId()]) || $language->getId() == $entity_langcode) {
...@@ -461,7 +484,7 @@ public function entityFormSourceChange($form, FormStateInterface $form_state) { ...@@ -461,7 +484,7 @@ public function entityFormSourceChange($form, FormStateInterface $form_state) {
'source' => $source, 'source' => $source,
'target' => $form_object->getFormLangcode($form_state), 'target' => $form_object->getFormLangcode($form_state),
)); ));
$languages = language_list(); $languages = $this->languageManager->getLanguages();
drupal_set_message(t('Source language set to: %language', array('%language' => $languages[$source]->getName()))); drupal_set_message(t('Source language set to: %language', array('%language' => $languages[$source]->getName())));
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\UrlGeneratorInterface; use Drupal\Core\Routing\UrlGeneratorInterface;
use Drupal\Core\Url; use Drupal\Core\Url;
use Drupal\Core\Language\LanguageManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
...@@ -28,14 +29,24 @@ class LanguageDeleteForm extends EntityConfirmFormBase { ...@@ -28,14 +29,24 @@ class LanguageDeleteForm extends EntityConfirmFormBase {
*/ */
protected $urlGenerator; protected $urlGenerator;
/**
* The language manager.
*
* @var \Drupal\Core\Language\LanguageManagerInterface
*/
protected $languageManager;
/** /**
* Constructs a new LanguageDeleteForm object. * Constructs a new LanguageDeleteForm object.
* *
* @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
* The url generator service. * The url generator service.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/ */
public function __construct(UrlGeneratorInterface $url_generator) { public function __construct(UrlGeneratorInterface $url_generator, LanguageManagerInterface $language_manager) {
$this->urlGenerator = $url_generator; $this->urlGenerator = $url_generator;
$this->languageManager = $language_manager;
} }
/** /**
...@@ -43,7 +54,8 @@ public function __construct(UrlGeneratorInterface $url_generator) { ...@@ -43,7 +54,8 @@ public function __construct(UrlGeneratorInterface $url_generator) {
*/ */
public static function create(ContainerInterface $container) { public static function create(ContainerInterface $container) {
return new static( return new static(
$container->get('url_generator') $container->get('url_generator'),
$container->get('language_manager')
); );
} }
...@@ -96,7 +108,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -96,7 +108,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
} }
// Throw a 404 when attempting to delete a non-existing language. // Throw a 404 when attempting to delete a non-existing language.
$languages = language_list(); $languages = $this->languageManager->getLanguages();
if (!isset($languages[$langcode])) { if (!isset($languages[$langcode])) {
throw new NotFoundHttpException(); throw new NotFoundHttpException();
} }
......
...@@ -60,7 +60,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -60,7 +60,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form = array(); $form = array();
// Initialize a language list to the ones available, including English. // Initialize a language list to the ones available, including English.
$languages = language_list(); $languages = $this->languageManager->getLanguages();
$existing_languages = array(); $existing_languages = array();
foreach ($languages as $langcode => $language) { foreach ($languages as $langcode => $language) {
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl; use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl;
/** /**
...@@ -16,6 +19,36 @@ ...@@ -16,6 +19,36 @@
*/ */
class NegotiationUrlForm extends ConfigFormBase { class NegotiationUrlForm extends ConfigFormBase {
/**
* The language manager.
*
* @var \Drupal\Core\Language\LanguageManagerInterface
*/
protected $languageManager;
/**
* Constructs a new LanguageDeleteForm object.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/
public function __construct(ConfigFactoryInterface $config_factory, LanguageManagerInterface $language_manager) {
parent::__construct($config_factory);
$this->languageManager = $language_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('language_manager')
);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
...@@ -69,7 +102,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -69,7 +102,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
), ),
); );
$languages = language_list(); $languages = $this->languageManager->getLanguages();
$prefixes = language_negotiation_url_prefixes(); $prefixes = language_negotiation_url_prefixes();
$domains = language_negotiation_url_domains(); $domains = language_negotiation_url_domains();
foreach ($languages as $langcode => $language) { foreach ($languages as $langcode => $language) {
...@@ -98,7 +131,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -98,7 +131,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
* Implements \Drupal\Core\Form\FormInterface::validateForm(). * Implements \Drupal\Core\Form\FormInterface::validateForm().
*/ */
public function validateForm(array &$form, FormStateInterface $form_state) { public function validateForm(array &$form, FormStateInterface $form_state) {
$languages = language_list(); $languages = $this->languageManager->getLanguages();
// Count repeated values for uniqueness check. // Count repeated values for uniqueness check.
$count = array_count_values($form_state->getValue('prefix')); $count = array_count_values($form_state->getValue('prefix'));
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
use Drupal\Core\Condition\ConditionPluginBase; use Drupal\Core\Condition\ConditionPluginBase;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* Provides a 'Language' condition. * Provides a 'Language' condition.
...@@ -23,15 +26,54 @@ ...@@ -23,15 +26,54 @@
* ) * )
* *
*/ */
class Language extends ConditionPluginBase { class Language extends ConditionPluginBase implements ContainerFactoryPluginInterface {
/**
* The Language manager.
*
* @var \Drupal\Core\Language\LanguageManagerInterface
*/
protected $languageManager;
/**
* Creates a new Language instance.
*
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
* @param array $configuration
* The plugin configuration, i.e. an array with configuration values keyed
* by configuration option name. The special key 'context' may be used to
* initialize the defined contexts by setting it to an array of context
* values keyed by context names.
* @param string $plugin_id
* The plugin_id for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
*/
public function __construct(LanguageManagerInterface $language_manager, array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->languageManager = $language_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static(
$container->get('language_manager'),
$configuration,
$plugin_id,
$plugin_definition
);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function buildConfigurationForm(array $form, FormStateInterface $form_state) { public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
if (\Drupal::languageManager()->isMultilingual()) { if ($this->languageManager->isMultilingual()) {
// Fetch languages. // Fetch languages.
$languages = \Drupal::languageManager()->getLanguages(LanguageInterface::STATE_CONFIGURABLE); $languages = $this->languageManager->getLanguages();
$langcodes_options = array(); $langcodes_options = array();
foreach ($languages as $language) { foreach ($languages as $language) {
$langcodes_options[$language->getId()] = $language->getName(); $langcodes_options[$language->getId()] = $language->getName();
...@@ -65,7 +107,7 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s ...@@ -65,7 +107,7 @@ public function submitConfigurationForm(array &$form, FormStateInterface $form_s
* {@inheritdoc} * {@inheritdoc}
*/ */
public function summary() { public function summary() {
$language_list = language_list(LanguageInterface::STATE_ALL); $language_list = $this->languageManager->getLanguages(LanguageInterface::STATE_ALL);
$selected = $this->configuration['langcodes']; $selected = $this->configuration['langcodes'];
// Reduce the language list to an array of language names. // Reduce the language list to an array of language names.
$language_names = array_reduce($language_list, function(&$result, $item) use ($selected) { $language_names = array_reduce($language_list, function(&$result, $item) use ($selected) {
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
use Drupal\simpletest\WebTestBase; use Drupal\simpletest\WebTestBase;
/** /**
* Tests enabling Language if a module exists that calls language_list during * Tests enabling Language if a module exists that calls
* installation. * LanguageManager::getLanguages() during installation.
* *
* @group language * @group language
*/ */
...@@ -28,8 +28,8 @@ class LanguageListModuleInstallTest extends WebTestBase { ...@@ -28,8 +28,8 @@ class LanguageListModuleInstallTest extends WebTestBase {
* Tests enabling Language. * Tests enabling Language.
*/ */
function testModuleInstallLanguageList() { function testModuleInstallLanguageList() {
// Since language_list uses static caches we need to do this by enabling // Since LanguageManager::getLanguages() uses static caches we need to do
// the module using the UI. // this by enabling the module using the UI.
$admin_user = $this->drupalCreateUser(array('access administration pages', 'administer modules')); $admin_user = $this->drupalCreateUser(array('access administration pages', 'administer modules'));
$this->drupalLogin($admin_user); $this->drupalLogin($admin_user);
$edit = array(); $edit = array();
......
...@@ -32,7 +32,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { ...@@ -32,7 +32,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$langcode = $filter_values['langcode']; $langcode = $filter_values['langcode'];