diff --git a/core/modules/locale/lib/Drupal/locale/StringBase.php b/core/modules/locale/lib/Drupal/locale/StringBase.php index 977b89f..f4c7fab 100644 --- a/core/modules/locale/lib/Drupal/locale/StringBase.php +++ b/core/modules/locale/lib/Drupal/locale/StringBase.php @@ -26,7 +26,7 @@ * * @var string */ - public $location; + public $locations; /** * The source string. @@ -152,23 +152,23 @@ public function getValues(array $fields) { } /** - * Implements Drupal\locale\StringInterface::getLocation(). + * Implements Drupal\locale\StringInterface::getLocations(). */ - public function getLocation($load = TRUE) { - if ($load && !isset($this->location)) { - $this->location = array(); + public function getLocations($load = TRUE) { + if ($load && !isset($this->locations)) { + $this->locations = array(); foreach ($this->getStorage()->getLocations(array('sid' => $this->getId())) as $location) { - $this->location[$location->type][$location->name] = $location->lid; + $this->locations[$location->type][$location->name] = $location->lid; } } - return $this->location; + return $this->locations; } /** * Implements Drupal\locale\StringInterface::addLocation(). */ public function addLocation($type, $name) { - $this->location[$type][$name] = TRUE; + $this->locations[$type][$name] = TRUE; return $this; } @@ -176,7 +176,7 @@ public function addLocation($type, $name) { * Implements Drupal\locale\StringInterface::hasLocation(). */ public function hasLocation($type, $name) { - $location = $this->getLocation(TRUE); + $location = $this->getLocations(TRUE); return isset($location[$type]) ? !empty($location[$type][$name]) : FALSE; } diff --git a/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php b/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php index 05e4069..127b06c 100644 --- a/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php +++ b/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php @@ -139,7 +139,7 @@ public function save($string) { * The string object. */ protected function updateLocation($string) { - if ($location = $string->getLocation(FALSE)) { + if ($location = $string->getLocations(FALSE)) { $created = FALSE; foreach ($location as $type => $type_location) { foreach ($type_location as $name => $lid) { diff --git a/core/modules/locale/lib/Drupal/locale/StringInterface.php b/core/modules/locale/lib/Drupal/locale/StringInterface.php index 171c6e2..b79b2a4 100644 --- a/core/modules/locale/lib/Drupal/locale/StringInterface.php +++ b/core/modules/locale/lib/Drupal/locale/StringInterface.php @@ -174,7 +174,7 @@ public function getValues(array $fields); * @return array * Location ids indexed by type and name. */ - public function getLocation($load = TRUE); + public function getLocations($load = TRUE); /** * Adds a location for this string.