updateLocation example

$result = $this->dbStringInsert($string);
      if ($string->isSource() && $result) {
        // Only for source strings, we set the locale identifier.         $string->setId($result);
      }
      $string->setStorage($this);
    }
    else {
      $this->dbStringUpdate($string);
    }
    // Update locations if they come with the string.     $this->updateLocation($string);
    return $this;
  }

  /** * Update locations for string. * * @param \Drupal\locale\StringInterface $string * The string object. */
  protected function updateLocation($string) {
    if ($locations = $string->getLocations(TRUE)) {
      
Home | Imprint | This part of the site doesn't use cookies.