Helper/SiteAccess.php
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;
    }
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;
    }
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 ; }
Returns languages based on mandatorId or siteaccess.

@param null|int $mandatorId
@param null|string $siteAccess

@return array
Returns languages based on mandatorId or siteaccess .