public function generateLanguageMaskFromLanguageIds(array $languageIds, $alwaysAvailable): int
    {
        // make sure alwaysAvailable part of bit mask always results in 1 or 0
        $languageMask = $alwaysAvailable ? 1 : 0;

        foreach ($languageIds as $languageId) {
            $languageMask |= $languageId;
        }

        return $languageMask;
    }
public function generateLanguageMaskFromLanguageIds(array $languageIds, $alwaysAvailable): int
    {
        // make sure alwaysAvailable part of bit mask always results in 1 or 0
        $languageMask = $alwaysAvailable ? 1 : 0;

        foreach ($languageIds as $languageId) {
            $languageMask |= $languageId;
        }

        return $languageMask;
    }
public function generateLanguageMaskFromLanguageIds ( array $ languageIds , $ alwaysAvailable ) : int { // make sure alwaysAvailable part of bit mask always results in 1 or 0 $ languageMask = $ alwaysAvailable ? 1 : 0 ; foreach ( $ languageIds as $ languageId ) { $ languageMask |= $ languageId ; } return $ languageMask ; }
Generates a language mask from pre-loaded Language Ids.

@param int[] $languageIds
@param bool $alwaysAvailable

@return int
Generates a language mask from pre - loaded Language Ids .