public function getCapabilitiesForSite($idSite)
    {
        $result = [];
        foreach ($this->capabilityProvider->getAllCapabilityIds() as $capabilityId) {
            if (empty($this->idsitesByAccess[$capabilityId])) {
                continue;
            }

            if (in_array($idSite, $this->idsitesByAccess[$capabilityId])) {
                $result[] = $capabilityId;
            }
        }
        return $result;
    }
public function getCapabilitiesForSite($idSite)
    {
        $result = [];
        foreach ($this->capabilityProvider->getAllCapabilityIds() as $capabilityId) {
            if (empty($this->idsitesByAccess[$capabilityId])) {
                continue;
            }

            if (in_array($idSite, $this->idsitesByAccess[$capabilityId])) {
                $result[] = $capabilityId;
            }
        }
        return $result;
    }
public function getCapabilitiesForSite ( $ idSite ) { $ result = [ ] ; foreach ( $ this -> capabilityProvider -> getAllCapabilityIds ( ) as $ capabilityId ) { if ( empty ( $ this -> idsitesByAccess [ $ capabilityId ] ) ) { continue ; } if ( in_array ( $ idSite , $ this -> idsitesByAccess [ $ capabilityId ] ) ) { $ result [ ] = $ capabilityId ; } } return $ result ; }
Returns the capabilities the current user has for a given site.

@param int $idSite The site to check.
@return string[] The capabilities the user has.
Returns the capabilities the current user has for a given site .