original_string: protected function getLocaleGroup($parentName, $locale)
      {
          if (!($locale instanceof LocaleEntity)) {
              $l = $this->app->make(LocaleRepository::class)->findApproved($locale);
              if ($l === null) {
                  throw new UserMessageException(t("The locale identifier '%s' is not valid", $locale));
              }
              $locale = $l;
          }
          $localeID = $locale->getID();
          if (!isset($this->localeGroups[$parentName])) {
              $this->localeGroups[$parentName] = [];
          }
          if (!isset($this->localeGroups[$parentName][$localeID])) {
              $this->localeGroups[$parentName][$localeID] = $this->getGroup($localeID, $parentName);
          }
  
          return $this->localeGroups[$parentName][$localeID];
      }
code: protected function getLocaleGroup($parentName, $locale)
      {
          if (!($locale instanceof LocaleEntity)) {
              $l = $this->app->make(LocaleRepository::class)->findApproved($locale);
              if ($l === null) {
                  throw new UserMessageException(t("The locale identifier '%s' is not valid", $locale));
              }
              $locale = $l;
          }
          $localeID = $locale->getID();
          if (!isset($this->localeGroups[$parentName])) {
              $this->localeGroups[$parentName] = [];
          }
          if (!isset($this->localeGroups[$parentName][$localeID])) {
              $this->localeGroups[$parentName][$localeID] = $this->getGroup($localeID, $parentName);
          }
  
          return $this->localeGroups[$parentName][$localeID];
      }
code_tokens: protected function getLocaleGroup ( $ parentName , $ locale ) { if ( ! ( $ locale instanceof LocaleEntity ) ) { $ l = $ this -> app -> make ( LocaleRepository :: class ) -> findApproved ( $ locale ) ; if ( $ l === null ) { throw new UserMessageException ( t ( "The locale identifier '%s' is not valid" , $ locale ) ) ; } $ locale = $ l ; } $ localeID = $ locale -> getID ( ) ; if ( ! isset ( $ this -> localeGroups [ $ parentName ] ) ) { $ this -> localeGroups [ $ parentName ] = [ ] ; } if ( ! isset ( $ this -> localeGroups [ $ parentName ] [ $ localeID ] ) ) { $ this -> localeGroups [ $ parentName ] [ $ localeID ] = $ this -> getGroup ( $ localeID , $ parentName ) ; } return $ this -> localeGroups [ $ parentName ] [ $ localeID ] ; }
docstring: Get a locale group given its parent group name.
  
  @param string $parentName
  @param LocaleEntity|string $locale
docstring_tokens: Get a locale group given its parent group name .