Doctrine/ORM/Filter/Listener/PrivateSharingSubscriber.php
private function addWhereSecurityIdentitiesForSharing(GetFilterEvent $event, ClassMetadata $meta)
    {
        $where = '';
        $mapSids = (array) $event->getRealParameter('map_security_identities');
        $mapSids = !empty($mapSids) ? $mapSids : ['_without_security_identity' => 'null'];
        $connection = $event->getConnection();

        foreach ($mapSids as $type => $stringIds) {
            $where .= '' === $where ? '' : ' OR ';
            $where .= sprintf(
                '(s.%s = %s AND s.%s IN (%s))',
                $meta->getColumnName('identityClass'),
                $connection->quote($type),
                $meta->getColumnName('identityName'),
                $stringIds
            );
        }

        return $where;
    }
private function addWhereSecurityIdentitiesForSharing(GetFilterEvent $event, ClassMetadata $meta)
    {
        $where = '';
        $mapSids = (array) $event->getRealParameter('map_security_identities');
        $mapSids = !empty($mapSids) ? $mapSids : ['_without_security_identity' => 'null'];
        $connection = $event->getConnection();

        foreach ($mapSids as $type => $stringIds) {
            $where .= '' === $where ? '' : ' OR ';
            $where .= sprintf(
                '(s.%s = %s AND s.%s IN (%s))',
                $meta->getColumnName('identityClass'),
                $connection->quote($type),
                $meta->getColumnName('identityName'),
                $stringIds
            );
        }

        return $where;
    }
private function addWhereSecurityIdentitiesForSharing ( GetFilterEvent $ event , ClassMetadata $ meta ) { $ where = '' ; $ mapSids = ( array ) $ event -> getRealParameter ( 'map_security_identities' ) ; $ mapSids = ! empty ( $ mapSids ) ? $ mapSids : [ '_without_security_identity' => 'null' ] ; $ connection = $ event -> getConnection ( ) ; foreach ( $ mapSids as $ type => $ stringIds ) { $ where .= '' === $ where ? '' : ' OR ' ; $ where .= sprintf ( '(s.%s = %s AND s.%s IN (%s))' , $ meta -> getColumnName ( 'identityClass' ) , $ connection -> quote ( $ type ) , $ meta -> getColumnName ( 'identityName' ) , $ stringIds ) ; } return $ where ; }
Add the where condition of security identities.

@param GetFilterEvent $event The event
@param ClassMetadata  $meta  The class metadata of sharing entity

@return string
Add the where condition of security identities .