Sharing/SharingManager.php
private function buildSubjects(array $objects)
    {
        $subjects = [];

        foreach ($objects as $object) {
            $subject = SubjectIdentity::fromObject($object);
            $id = SharingUtils::getCacheId($subject);

            if (!\array_key_exists($id, $this->cacheSubjectSharing)
                    && $this->hasIdentityPermissible()
                    && $this->hasSharingVisibility($subject)
                    && $this->hasSubjectConfig($subject->getType())) {
                $subjects[$id] = $subject;
                $this->cacheSubjectSharing[$id] = false;
            }
        }

        return $subjects;
    }
private function buildSubjects(array $objects)
    {
        $subjects = [];

        foreach ($objects as $object) {
            $subject = SubjectIdentity::fromObject($object);
            $id = SharingUtils::getCacheId($subject);

            if (!\array_key_exists($id, $this->cacheSubjectSharing)
                    && $this->hasIdentityPermissible()
                    && $this->hasSharingVisibility($subject)
                    && $this->hasSubjectConfig($subject->getType())) {
                $subjects[$id] = $subject;
                $this->cacheSubjectSharing[$id] = false;
            }
        }

        return $subjects;
    }
private function buildSubjects ( array $ objects ) { $ subjects = [ ] ; foreach ( $ objects as $ object ) { $ subject = SubjectIdentity :: fromObject ( $ object ) ; $ id = SharingUtils :: getCacheId ( $ subject ) ; if ( ! \ array_key_exists ( $ id , $ this -> cacheSubjectSharing ) && $ this -> hasIdentityPermissible ( ) && $ this -> hasSharingVisibility ( $ subject ) && $ this -> hasSubjectConfig ( $ subject -> getType ( ) ) ) { $ subjects [ $ id ] = $ subject ; $ this -> cacheSubjectSharing [ $ id ] = false ; } } return $ subjects ; }
Convert the objects into subject identities.

@param object[] $objects The objects

@return SubjectIdentityInterface[]
Convert the objects into subject identities .