eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\LocationUpdateStruct::getSortFieldName PHP Method

getSortFieldName() protected method

Returns the '*' part of SORT_FIELD_* constant name.
protected getSortFieldName ( integer $sortField ) : string
$sortField integer
return string
    protected function getSortFieldName($sortField)
    {
        $class = new \ReflectionClass('\\eZ\\Publish\\API\\Repository\\Values\\Content\\Location');
        foreach ($class->getConstants() as $constantName => $constantValue) {
            if ($constantValue == $sortField && strpos($constantName, 'SORT_FIELD_') >= 0) {
                return str_replace('SORT_FIELD_', '', $constantName);
            }
        }
        return '';
    }
LocationUpdateStruct