protected function translateFieldCode(FieldsDefinition $fields, $fieldId)
    {
        $field = $fields->getField($fieldId);
        if ($field instanceof FieldInterface) {
            return  '{f' . $field->getOrder() . '}';
        }

        return $fieldId;
    }
protected function translateFieldCode(FieldsDefinition $fields, $fieldId)
    {
        $field = $fields->getField($fieldId);
        if ($field instanceof FieldInterface) {
            return  '{f' . $field->getOrder() . '}';
        }

        return $fieldId;
    }
protected function translateFieldCode ( FieldsDefinition $ fields , $ fieldId ) { $ field = $ fields -> getField ( $ fieldId ) ; if ( $ field instanceof FieldInterface ) { return '{f' . $ field -> getOrder ( ) . '}' ; } return $ fieldId ; }
Translate a field code to the field order number

@param FieldsDefinition $fields
@param string $fieldId
@return string {order} or original value
Translate a field code to the field order number