public function getLanguages($mandatorId = null, $siteAccess = null)
    {
        if ($mandatorId) {
            $languages = $this->getMainLanguagesBySiteAccesses(
                $this->getSiteAccessesByMandatorId($mandatorId)
            );
        } elseif ($siteAccess) {
            $languages = $this->configResolver->getParameter('languages', '', $siteAccess);
        } else {
            $languages = $this->configResolver->getParameter('languages');
        }

        if (empty($languages)) {
            throw new LogicException(sprintf('No languages found using SiteAccess or mandatorId'));
        }

        return $languages;
    }