Helper/SiteAccess.php
public function getSiteAccesses($mandatorId = null, $siteAccess = null)
    {
        if ($mandatorId) {
            $siteAccesses = $this->getSiteaccessesByMandatorId($mandatorId);
        } elseif ($siteAccess) {
            $siteAccesses = array($siteAccess);
        } else {
            $siteAccesses = array($this->siteAccess->name);
        }

        return $siteAccesses;
    }
public function getSiteAccesses($mandatorId = null, $siteAccess = null)
    {
        if ($mandatorId) {
            $siteAccesses = $this->getSiteaccessesByMandatorId($mandatorId);
        } elseif ($siteAccess) {
            $siteAccesses = array($siteAccess);
        } else {
            $siteAccesses = array($this->siteAccess->name);
        }

        return $siteAccesses;
    }
public function getSiteAccesses ( $ mandatorId = null , $ siteAccess = null ) { if ( $ mandatorId ) { $ siteAccesses = $ this -> getSiteaccessesByMandatorId ( $ mandatorId ) ; } elseif ( $ siteAccess ) { $ siteAccesses = array ( $ siteAccess ) ; } else { $ siteAccesses = array ( $ this -> siteAccess -> name ) ; } return $ siteAccesses ; }
Returns siteAccesses based on mandatorId, requested siteAccess or default SiteAccess.

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

@return array
Returns siteAccesses based on mandatorId requested siteAccess or default SiteAccess .