# Abstract Document type.
# "Documents" always have a publicly-visible URL.
# The most prominent subclass of Document is "Neos.NodeTypes:Page", but
# anything page-like (like a blog post) should subclass "Neos.Neos:Document".
'Neos.Neos:Document':
  superTypes:
    'Neos.Neos:Node': true
    'Neos.Neos:Hidable': true
    'Neos.Neos:Timable': true
  abstract: true
  aggregate: true
  constraints:
    nodeTypes:
      '*': false
      'Neos.Neos:Document': true
  options:
    nodeCreationHandlers:
      documentTitle:
        nodeCreationHandler: 'Neos\Neos\Ui\NodeCreationHandler\DocumentTitleNodeCreationHandler'
  ui:
    label: 'Document'
    group: 'general'
    search:
      searchCategory: 'Documents'
    inspector:
      groups:
        document:
          label: i18n
          position: 10
          icon: 'icon-file'
    creationDialog:
      elements:
        title:
          type: string
          ui:
            label: i18n
            editor: 'Neos.Neos/Inspector/Editors/TextFieldEditor'
          validation:
            'Neos.Neos/Validation/NotEmptyValidator': []
  properties:
    _nodeType:
      ui:
        inspector:
          editorOptions:
            baseNodeType: 'Neos.Neos:Document'
    title:
      type: string
      ui:
        label: i18n
        reloadPageIfChanged: true
        inspector:
          group: 'document'
      validation:
        'Neos.Neos/Validation/NotEmptyValidator': []
        'Neos.Neos/Validation/StringLengthValidator':
          minimum: 1
          maximum: 255
    uriPathSegment:
      type: string
      ui:
        label: i18n
        reloadPageIfChanged: true
        inspector:
          group: 'document'
      validation:
        'Neos.Neos/Validation/NotEmptyValidator': []
        'Neos.Neos/Validation/StringLengthValidator':
          minimum: 1
          maximum: 255
        'Neos.Neos/Validation/RegularExpressionValidator':
          regularExpression: '/^[a-z0-9\-]+$/i'
    _hidden:
      ui:
        reloadPageIfChanged: true
    _hiddenInIndex:
      type: boolean
      ui:
        label: i18n
        reloadPageIfChanged: true
        inspector:
          group: 'visibility'
          position: 40
