eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\UserMetadata::handle PHP Method

handle() public method

accept() must be called before calling this method.
public handle ( CriteriaConverter $converter, eZ\Publish\Core\Persistence\Database\SelectQuery $query, eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion, array $languageSettings ) : eZ\Publish\Core\Persistence\Database\Expression
$converter eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter
$query eZ\Publish\Core\Persistence\Database\SelectQuery
$criterion eZ\Publish\API\Repository\Values\Content\Query\Criterion
$languageSettings array
return eZ\Publish\Core\Persistence\Database\Expression
    public function handle(CriteriaConverter $converter, SelectQuery $query, Criterion $criterion, array $languageSettings)
    {
        switch ($criterion->target) {
            case Criterion\UserMetadata::MODIFIER:
                return $query->expr->in($this->dbHandler->quoteColumn('creator_id', 'ezcontentobject_version'), $criterion->value);
            case Criterion\UserMetadata::GROUP:
                $subSelect = $query->subSelect();
                $subSelect->select($this->dbHandler->quoteColumn('contentobject_id', 't1'))->from($query->alias($this->dbHandler->quoteTable('ezcontentobject_tree'), 't1'))->innerJoin($query->alias($this->dbHandler->quoteTable('ezcontentobject_tree'), 't2'), $query->expr->like('t1.path_string', $query->expr->concat('t2.path_string', $query->bindValue('%'))))->where($query->expr->in($this->dbHandler->quoteColumn('contentobject_id', 't2'), $criterion->value));
                return $query->expr->in($this->dbHandler->quoteColumn('owner_id', 'ezcontentobject'), $subSelect);
            case Criterion\UserMetadata::OWNER:
                return $query->expr->in($this->dbHandler->quoteColumn('owner_id', 'ezcontentobject'), $criterion->value);
        }
        throw new RuntimeException("Invalid target criterion encountered:'" . $criterion->target . "'");
    }
UserMetadata