protected function addPermissionsCriterion(Criterion &$criterion)
    {
        $permissionCriterion = $this->permissionCriterionResolver->getPermissionsCriterion('content', 'read');
        if ($permissionCriterion === true || $permissionCriterion === false) {
            return $permissionCriterion;
        }

        // Merge with original $criterion
        if ($criterion instanceof LogicalAnd) {
            $criterion->criteria[] = $permissionCriterion;
        } else {
            $criterion = new LogicalAnd(
                array(
                    $criterion,
                    $permissionCriterion,
                )
            );
        }

        return true;
    }
protected function addPermissionsCriterion(Criterion &$criterion)
    {
        $permissionCriterion = $this->permissionCriterionResolver->getPermissionsCriterion('content', 'read');
        if ($permissionCriterion === true || $permissionCriterion === false) {
            return $permissionCriterion;
        }

        // Merge with original $criterion
        if ($criterion instanceof LogicalAnd) {
            $criterion->criteria[] = $permissionCriterion;
        } else {
            $criterion = new LogicalAnd(
                array(
                    $criterion,
                    $permissionCriterion,
                )
            );
        }

        return true;
    }
protected function addPermissionsCriterion ( Criterion & $ criterion ) { $ permissionCriterion = $ this -> permissionCriterionResolver -> getPermissionsCriterion ( 'content' , 'read' ) ; if ( $ permissionCriterion === true || $ permissionCriterion === false ) { return $ permissionCriterion ; } // Merge with original $criterion if ( $ criterion instanceof LogicalAnd ) { $ criterion -> criteria [ ] = $ permissionCriterion ; } else { $ criterion = new LogicalAnd ( array ( $ criterion , $ permissionCriterion , ) ) ; } return true ; }
Adds content, read Permission criteria if needed and return false if no access at all.

@uses \eZ\Publish\API\Repository\PermissionCriterionResolver::getPermissionsCriterion()

@param \eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion

@return bool|\eZ\Publish\API\Repository\Values\Content\Query\Criterion
Adds content read Permission criteria if needed and return false if no access at all .