public function getSortFieldName(
        SortClause $sortClause,
        $contentTypeIdentifier,
        $fieldDefinitionIdentifier,
        $name = null
    ) {
        $fieldMap = $this->getSearchableFieldMap();

        // First check if field exists in type, there is nothing to do if it doesn't
        if (!isset($fieldMap[$contentTypeIdentifier][$fieldDefinitionIdentifier])) {
            return null;
        }

        $fieldName = array_keys($this->getIndexFieldName(
            $sortClause,
            $contentTypeIdentifier,
            $fieldDefinitionIdentifier,
            $fieldMap[$contentTypeIdentifier][$fieldDefinitionIdentifier]['field_type_identifier'],
            $name,
            true
        ));

        return reset($fieldName);
    }
public function getSortFieldName(
        SortClause $sortClause,
        $contentTypeIdentifier,
        $fieldDefinitionIdentifier,
        $name = null
    ) {
        $fieldMap = $this->getSearchableFieldMap();

        // First check if field exists in type, there is nothing to do if it doesn't
        if (!isset($fieldMap[$contentTypeIdentifier][$fieldDefinitionIdentifier])) {
            return null;
        }

        $fieldName = array_keys($this->getIndexFieldName(
            $sortClause,
            $contentTypeIdentifier,
            $fieldDefinitionIdentifier,
            $fieldMap[$contentTypeIdentifier][$fieldDefinitionIdentifier]['field_type_identifier'],
            $name,
            true
        ));

        return reset($fieldName);
    }
public function getSortFieldName ( SortClause $ sortClause , $ contentTypeIdentifier , $ fieldDefinitionIdentifier , $ name = null ) { $ fieldMap = $ this -> getSearchableFieldMap ( ) ; // First check if field exists in type, there is nothing to do if it doesn't if ( ! isset ( $ fieldMap [ $ contentTypeIdentifier ] [ $ fieldDefinitionIdentifier ] ) ) { return null ; } $ fieldName = array_keys ( $ this -> getIndexFieldName ( $ sortClause , $ contentTypeIdentifier , $ fieldDefinitionIdentifier , $ fieldMap [ $ contentTypeIdentifier ] [ $ fieldDefinitionIdentifier ] [ 'field_type_identifier' ] , $ name , true ) ) ; return reset ( $ fieldName ) ; }
For the given parameters returns search backend field name to sort on or
null if the field could not be found.

The method will check for custom fields if given $sortClause implements
CustomFieldInterface. With optional parameter $name specific field from
field type's Indexable implementation can be targeted.

Will return null if no sortable field is found.

@see \eZ\Publish\API\Repository\Values\Content\Query\CustomFieldInterface
@see \eZ\Publish\SPI\FieldType\Indexable

@param \eZ\Publish\API\Repository\Values\Content\Query\SortClause $sortClause
@param string $contentTypeIdentifier
@param string $fieldDefinitionIdentifier
@param null|string $name

@return null|string
For the given parameters returns search backend field name to sort on or null if the field could not be found .