Skip to content

Instantly share code, notes, and snippets.

@vijaycs85
Created October 13, 2014 11:18
Show Gist options
  • Save vijaycs85/4596f1ad618e79b4a0e8 to your computer and use it in GitHub Desktop.
Save vijaycs85/4596f1ad618e79b4a0e8 to your computer and use it in GitHub Desktop.
diff --git a/core/lib/Drupal/Core/Language/LanguageInterface.php b/core/lib/Drupal/Core/Language/LanguageInterface.php
index c3e39a7..ee4f2ba 100644
--- a/core/lib/Drupal/Core/Language/LanguageInterface.php
+++ b/core/lib/Drupal/Core/Language/LanguageInterface.php
@@ -110,6 +110,14 @@
public function getName();
/**
+ * Sets the name of the language.
+ *
+ * @param string $name
+ * The human-readable English name of the language.
+ */
+ public function setName($name);
+
+ /**
* Gets the ID (language code).
*
* @return string
diff --git a/core/modules/language/src/Entity/ConfigurableLanguage.php b/core/modules/language/src/Entity/ConfigurableLanguage.php
index 668a9aa..c240d66 100644
--- a/core/modules/language/src/Entity/ConfigurableLanguage.php
+++ b/core/modules/language/src/Entity/ConfigurableLanguage.php
@@ -203,6 +203,13 @@ public function getName() {
/**
* {@inheritdoc}
*/
+ public function setName($name) {
+
+ }
+
+ /**
+ * {@inheritdoc}
+ */
public function getId() {
return $this->id();
}
diff --git a/core/lib/Drupal/Core/Language/Language.php b/core/lib/Drupal/Core/Language/Language.php
index 175f9fb..2c399d9 100644
--- a/core/lib/Drupal/Core/Language/Language.php
+++ b/core/lib/Drupal/Core/Language/Language.php
@@ -106,6 +106,13 @@ public function getName() {
/**
* {@inheritdoc}
*/
+ public function setName($name) {
+ $this->name = $name;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
public function getId() {
return $this->id;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment