objectTypeToString function

String objectTypeToString(
  1. ObjectTypes type
)

Returns the string value of the given object type.

Implementation

String objectTypeToString(ObjectTypes type) {
  switch (type) {
    case ObjectTypes.Error:
      return 'error';
    case ObjectTypes.Database:
      return 'database';
    case ObjectTypes.List:
      return 'list';
    case ObjectTypes.Page:
      return 'page';
    case ObjectTypes.Object:
      return 'object';
    case ObjectTypes.Block:
      return 'block';
    case ObjectTypes.None:
      return '';
  }
}