Scalr\Api\Service\User\V1beta0\Controller\Events::getDefaultCriteria PHP Метод

getDefaultCriteria() приватный Метод

Gets Default search criteria for the Account scope
private getDefaultCriteria ( ) : array
Результат array Returns array of the default search criteria for the Account scope
    private function getDefaultCriteria()
    {
        $parts = [['$and' => [['envId' => null], ['accountId' => null]]], ['$and' => [['envId' => null], ['accountId' => $this->getUser()->accountId]]]];
        if ($this->getScope() === ScopeInterface::SCOPE_ENVIRONMENT) {
            $parts[] = ['$and' => [['envId' => $this->getEnvironment()->id], ['accountId' => $this->getUser()->accountId]]];
        }
        return [['$or' => $parts]];
    }