diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index c9b1c43..4c23040 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -2551,7 +2551,7 @@ function drupal_language_initialize() { * @see Drupal\Core\Language\LanguageManager * * @param string $type - * The type of language object needed, e.g. LANGUAGE_TYPE_INTERFACE. + * The type of language object needed, e.g. Language::TYPE_INTERFACE. * @param bool $reset * TRUE to reset the statically cached language object for the type, or for * all types if $type is NULL. diff --git a/core/includes/theme.inc b/core/includes/theme.inc index fc787e0..25de520 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2667,7 +2667,7 @@ function _template_preprocess_default_variables() { * @see html.tpl.php */ function template_preprocess_html(&$variables) { - $language_interface = language(LANGUAGE_TYPE_INTERFACE); + $language_interface = language(Language::TYPE_INTERFACE); // Compile a list of classes that are going to be applied to the body element. // This allows advanced theming based on context (home page, node of certain type, etc.). @@ -2799,7 +2799,7 @@ function template_preprocess_html(&$variables) { * @see page.tpl.php */ function template_preprocess_page(&$variables) { - $language_interface = language(LANGUAGE_TYPE_INTERFACE); + $language_interface = language(Language::TYPE_INTERFACE); $site_config = config('system.site'); // Move some variables to the top level for themer convenience and template cleanliness. @@ -2982,7 +2982,7 @@ function theme_get_suggestions($args, $base, $delimiter = '__') { */ function template_preprocess_maintenance_page(&$variables) { global $theme; - $language_interface = language(LANGUAGE_TYPE_INTERFACE); + $language_interface = language(Language::TYPE_INTERFACE); // Retrieve the theme data to list all available regions. $theme_data = list_themes(); $regions = $theme_data[$theme]->info['regions']; diff --git a/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php index 8b83ee4..bb664ff 100644 --- a/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php @@ -7,8 +7,8 @@ namespace Drupal\Core\Entity; -// @todo Don't depend on module level code. use Drupal\Core\Language\Language; +// @todo Don't depend on module level code. use Drupal\user\Plugin\Core\Entity\User; /** diff --git a/core/lib/Drupal/Core/Language/Language.php b/core/lib/Drupal/Core/Language/Language.php index eae7ca9..ae48aa5 100644 --- a/core/lib/Drupal/Core/Language/Language.php +++ b/core/lib/Drupal/Core/Language/Language.php @@ -20,7 +20,7 @@ class Language { // Properties within the Language are set up as the default language. public $name = ''; public $langcode = ''; - public $direction = static::DIRECTION_LTR; + public $direction; public $weight = 0; public $default = FALSE; public $method_id = NULL; @@ -134,6 +134,8 @@ public function __construct(array $options = array()) { } } } + + $this->direction = static::DIRECTION_LTR; } /** diff --git a/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php b/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php index e1bf74f..37ee752 100644 --- a/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php @@ -7,11 +7,11 @@ namespace Drupal\field\Tests; +use Drupal\Core\Language\Language; + /** * Unit test class for field bulk delete and batch purge functionality. */ -use Drupal\Core\Language\Language; - class BulkDeleteTest extends FieldTestBase { /** diff --git a/core/modules/language/language.module b/core/modules/language/language.module index b7c1c82..77cdfd1 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -644,7 +644,7 @@ function language_language_negotiation_info() { $negotiation_info = array(); $negotiation_info[LANGUAGE_NEGOTIATION_URL] = array( - 'types' => array(Language::TYPE_CONTENT, Language::TYPE_INTERFACE, LANGUAGE_TYPE_URL), + 'types' => array(Language::TYPE_CONTENT, Language::TYPE_INTERFACE, Language::TYPE_URL), 'callbacks' => array( 'negotiation' => 'language_from_url', 'language_switch' => 'language_switcher_url', diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessFieldTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessFieldTest.php index 33b9188..6bc1084 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessFieldTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessFieldTest.php @@ -7,11 +7,11 @@ namespace Drupal\node\Tests; +use Drupal\Core\Language\Language; + /** * Tests the interaction of the node access system with fields. */ -use Drupal\Core\Language\Language; - class NodeAccessFieldTest extends NodeTestBase { /** diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeEntityViewModeAlterTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeEntityViewModeAlterTest.php index 33cb0d3..99201f2 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeEntityViewModeAlterTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeEntityViewModeAlterTest.php @@ -7,11 +7,11 @@ namespace Drupal\node\Tests; +use Drupal\Core\Language\Language; + /** * Tests changing view modes for nodes. */ -use Drupal\Core\Language\Language; - class NodeEntityViewModeAlterTest extends NodeTestBase { /** diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php index cf7ca30..63d1fcb 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeRevisionsTest.php @@ -7,11 +7,11 @@ namespace Drupal\node\Tests; +use Drupal\Core\Language\Language; + /** * Tests the node revision functionality. */ -use Drupal\Core\Language\Language; - class NodeRevisionsTest extends NodeTestBase { protected $nodes; protected $logs; diff --git a/core/modules/node/node.install b/core/modules/node/node.install index c4587f4..2cf2999 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -1,13 +1,12 @@ -