Commit cecf4ea7 authored by catch's avatar catch

Issue #2226533 by martin107, filijonka, YesCT, Xano, jmolivas, Chris Dart,...

Issue #2226533 by martin107, filijonka, YesCT, Xano, jmolivas, Chris Dart, alexpott, tstoeckler, visabhishek | csg: Changes to the Language class due to the LanguageInterface (followup).
parent 3d98fc47
......@@ -693,7 +693,7 @@ function update_replace_permissions($replace) {
* It can be: LanguageInterface::STATE_CONFIGURABLE,
* LanguageInterface::STATE_LOCKED, or LanguageInterface::STATE_ALL.
*
* @return array
* @return \Drupal\Core\Language\LanguageInterface[]
* An associative array of languages, keyed by the language code, ordered by
* weight ascending and name ascending.
*/
......
......@@ -136,7 +136,7 @@ public function getLanguageName($langcode);
* (optional) An integer value that is used as the start value for the
* weights of the locked languages.
*
* @return array
* @return \Drupal\Core\Language\LanguageInterface[]
* An array of language objects.
*/
public function getDefaultLockedLanguages($weight = 0);
......
......@@ -77,7 +77,7 @@ class ConfigurableLanguageManager extends LanguageManager implements Configurabl
/**
* An array of language objects keyed by language type.
*
* @var array
* @var \Drupal\Core\Language\LanguageInterface[]
*/
protected $negotiatedLanguages;
......
......@@ -71,7 +71,7 @@ class LanguageNegotiator implements LanguageNegotiatorInterface {
/**
* An array of language objects keyed by method id.
*
* @var array
* @var \Drupal\Core\Language\LanguageInterface[]
*/
protected $negotiatedLanguages = array();
......
......@@ -8,6 +8,7 @@
namespace Drupal\language\Tests;
use Drupal\Core\Language\Language;
use Drupal\Core\Language\LanguageInterface;
use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl;
use Drupal\simpletest\WebTestBase;
use Symfony\Component\HttpFoundation\Request;
......@@ -74,7 +75,7 @@ function testUrlRewritingEdgeCases() {
* @param string $message2
* The message to display confirming prefixed URL is not working.
*/
private function checkUrl($language, $message1, $message2) {
private function checkUrl(LanguageInterface $language, $message1, $message2) {
$options = array('language' => $language, 'script' => '');
$base_path = trim(base_path(), '/');
$rewritten_path = trim(str_replace($base_path, '', \Drupal::url('<front>', array(), $options)), '/');
......
......@@ -52,7 +52,7 @@ public function updateType($old_type, $new_type) {
/**
* {@inheritdoc}
*/
public function clearRevisionsLanguage($language) {
public function clearRevisionsLanguage(LanguageInterface $language) {
return $this->database->update('node_revision')
->fields(array('langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED))
->condition('langcode', $language->getId())
......
......@@ -8,6 +8,7 @@
namespace Drupal\node;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Session\AccountInterface;
/**
......@@ -53,8 +54,8 @@ public function updateType($old_type, $new_type);
/**
* Unsets the language for all nodes with the given language.
*
* @param $language
* @param \Drupal\Core\Language\LanguageInterface $language
* The language object.
*/
public function clearRevisionsLanguage($language);
public function clearRevisionsLanguage(LanguageInterface $language);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment