public function filterBySysLanguage($queryResult, $exceptions = []) {
    $result = $queryResult;

    if (is_string($exceptions)) {
      $exceptions = GeneralUtility::intExplode(',', $exceptions, true);
    }

    $sysLanguageUid = $this->languageService->getSysLanguageUid();

    if (!in_array($sysLanguageUid, $exceptions, true)) {
      $result = [];

      foreach ($queryResult as $object) {
        $uid = $object->getSysLanguageUid();

        if (isset($uid) && $uid == $sysLanguageUid) {
          $result[] = $object;
        }
      }
    }

    return $result;
  }
public function filterBySysLanguage($queryResult, $exceptions = []) {
    $result = $queryResult;

    if (is_string($exceptions)) {
      $exceptions = GeneralUtility::intExplode(',', $exceptions, true);
    }

    $sysLanguageUid = $this->languageService->getSysLanguageUid();

    if (!in_array($sysLanguageUid, $exceptions, true)) {
      $result = [];

      foreach ($queryResult as $object) {
        $uid = $object->getSysLanguageUid();

        if (isset($uid) && $uid == $sysLanguageUid) {
          $result[] = $object;
        }
      }
    }

    return $result;
  }
public function filterBySysLanguage ( $ queryResult , $ exceptions = [ ] ) { $ result = $ queryResult ; if ( is_string ( $ exceptions ) ) { $ exceptions = GeneralUtility :: intExplode ( ',' , $ exceptions , true ) ; } $ sysLanguageUid = $ this -> languageService -> getSysLanguageUid ( ) ; if ( ! in_array ( $ sysLanguageUid , $ exceptions , true ) ) { $ result = [ ] ; foreach ( $ queryResult as $ object ) { $ uid = $ object -> getSysLanguageUid ( ) ; if ( isset ( $ uid ) && $ uid == $ sysLanguageUid ) { $ result [ ] = $ object ; } } } return $ result ; }
Filters a query result by system language.

@param object $queryResult The query result
@param array|string $exceptions The optional UIDs which are ignored as array or as string, seperated by `,`
@return object The filtered query result
Filters a query result by system language .