protected function getSearchFields(Criterion $criterion)
    {
        if ($criterion->target !== null) {
            return $this->fieldNameResolver->getFieldTypes(
                $criterion,
                $criterion->target,
                $this->fieldTypeIdentifier,
                $this->fieldName
            );
        }

        $targetFieldTypes = [];
        foreach ($this->contentTypeHandler->getSearchableFieldMap() as $fieldDefinitions) {
            foreach ($fieldDefinitions as $fieldIdentifier => $fieldDefinition) {
                if (!isset($fieldDefinition['field_type_identifier'])) {
                    continue;
                }

                if ($fieldDefinition['field_type_identifier'] !== $this->fieldTypeIdentifier) {
                    continue;
                }

                $fieldTypes = $this->fieldNameResolver->getFieldTypes(
                    $criterion,
                    $fieldIdentifier,
                    $this->fieldTypeIdentifier,
                    $this->fieldName
                );

                $targetFieldTypes = array_merge($targetFieldTypes, $fieldTypes);
            }
        }

        return $targetFieldTypes;
    }
protected function getSearchFields(Criterion $criterion)
    {
        if ($criterion->target !== null) {
            return $this->fieldNameResolver->getFieldTypes(
                $criterion,
                $criterion->target,
                $this->fieldTypeIdentifier,
                $this->fieldName
            );
        }

        $targetFieldTypes = [];
        foreach ($this->contentTypeHandler->getSearchableFieldMap() as $fieldDefinitions) {
            foreach ($fieldDefinitions as $fieldIdentifier => $fieldDefinition) {
                if (!isset($fieldDefinition['field_type_identifier'])) {
                    continue;
                }

                if ($fieldDefinition['field_type_identifier'] !== $this->fieldTypeIdentifier) {
                    continue;
                }

                $fieldTypes = $this->fieldNameResolver->getFieldTypes(
                    $criterion,
                    $fieldIdentifier,
                    $this->fieldTypeIdentifier,
                    $this->fieldName
                );

                $targetFieldTypes = array_merge($targetFieldTypes, $fieldTypes);
            }
        }

        return $targetFieldTypes;
    }
protected function getSearchFields ( Criterion $ criterion ) { if ( $ criterion -> target !== null ) { return $ this -> fieldNameResolver -> getFieldTypes ( $ criterion , $ criterion -> target , $ this -> fieldTypeIdentifier , $ this -> fieldName ) ; } $ targetFieldTypes = [ ] ; foreach ( $ this -> contentTypeHandler -> getSearchableFieldMap ( ) as $ fieldDefinitions ) { foreach ( $ fieldDefinitions as $ fieldIdentifier => $ fieldDefinition ) { if ( ! isset ( $ fieldDefinition [ 'field_type_identifier' ] ) ) { continue ; } if ( $ fieldDefinition [ 'field_type_identifier' ] !== $ this -> fieldTypeIdentifier ) { continue ; } $ fieldTypes = $ this -> fieldNameResolver -> getFieldTypes ( $ criterion , $ fieldIdentifier , $ this -> fieldTypeIdentifier , $ this -> fieldName ) ; $ targetFieldTypes = array_merge ( $ targetFieldTypes , $ fieldTypes ) ; } } return $ targetFieldTypes ; }
Get array of search fields.

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

@return \eZ\Publish\SPI\Search\FieldType[] Array of field types indexed by name
Get array of search fields .