protected function generateLanguageMask(array $keywords, $alwaysAvailable = true)
    {
        $languages = [];

        foreach ($keywords as $languageCode => $keyword) {
            $languages[$languageCode] = true;
        }

        if ($alwaysAvailable) {
            $languages['always-available'] = true;
        }

        return $this->languageMaskGenerator->generateLanguageMask($languages);
    }
protected function generateLanguageMask(array $keywords, $alwaysAvailable = true)
    {
        $languages = [];

        foreach ($keywords as $languageCode => $keyword) {
            $languages[$languageCode] = true;
        }

        if ($alwaysAvailable) {
            $languages['always-available'] = true;
        }

        return $this->languageMaskGenerator->generateLanguageMask($languages);
    }
protected function generateLanguageMask ( array $ keywords , $ alwaysAvailable = true ) { $ languages = [ ] ; foreach ( $ keywords as $ languageCode => $ keyword ) { $ languages [ $ languageCode ] = true ; } if ( $ alwaysAvailable ) { $ languages [ 'always-available' ] = true ; } return $ this -> languageMaskGenerator -> generateLanguageMask ( $ languages ) ; }
Generates a language mask for provided keywords.

@param string[] $keywords
@param bool $alwaysAvailable

@return int
Generates a language mask for provided keywords .