Neos\Flow\Security\Authorization\Privilege\Entity\Doctrine\EntityPrivilege::getSqlConstraint PHP Метод

getSqlConstraint() публичный Метод

Note: The result of this method cannot be cached, as the target table alias might change for different query scenarios
public getSqlConstraint ( Doctrine\Common\Persistence\Mapping\ClassMetadata $targetEntity, string $targetTableAlias ) : string
$targetEntity Doctrine\Common\Persistence\Mapping\ClassMetadata
$targetTableAlias string
Результат string
    public function getSqlConstraint(ClassMetadata $targetEntity, $targetTableAlias)
    {
        $this->evaluateMatcher();
        /** @var EntityManager $entityManager */
        $entityManager = $this->objectManager->get(ObjectManager::class);
        $sqlFilter = new SqlFilter($entityManager);
        if (!$this->matchesEntityType($targetEntity->getName())) {
            return null;
        }
        return $this->conditionGenerator->getSql($sqlFilter, $targetEntity, $targetTableAlias);
    }