Options
All
  • Public
  • Public/Protected
  • All
Menu

The client-side Folder document which extends the common BaseFolder model.

mixes

ClientDocumentMixin

see

Folders The world-level collection of Folder documents

see

FolderConfig The Folder configuration application

Hierarchy

  • any
    • Folder

Index

Constructors

  • Returns Folder

Properties

depth: number

The depth of this folder in its sidebar tree

children: Folder[]

An array of other Folders which are the displayed children of this one. This differs from the results of Folder.getSubfolders because reports the subset of child folders which are displayed to the current User in the UI.

displayed: boolean = false

Return whether the folder is displayed in the sidebar to the current User.

#contents: any

Accessors

  • get contents(): Document[]
  • set contents(value: Document[]): void
  • Return an array of the Document instances which are contained within this Folder.

    Returns Document[]

  • Return an array of the Document instances which are contained within this Folder.

    Parameters

    • value: Document[]

    Returns void

  • get documentClass(): Function
  • Return a reference to the Document type which is contained within this Folder.

    Returns Function

  • Return a reference to the WorldCollection instance which provides Documents to this Folder.

    Returns WorldCollection

  • get expanded(): boolean
  • Return whether the folder is currently expanded within the sidebar interface.

    Returns boolean

  • Return the list of ancestors of this folder, starting with the parent.

    Returns Folder[]

Methods

  • Export all Documents contained in this Folder to a given Compendium pack. Optionally update existing Documents within the Pack by name, otherwise append all new entries.

    Parameters

    • pack: CompendiumCollection

      A Compendium pack to which the documents will be exported

    • options: { updateByName: boolean } = {}
      • updateByName: boolean

    Returns Promise<CompendiumCollection>

    The updated Compendium Collection instance

  • exportDialog(pack: string, options?: any): Promise<void>
  • Provide a dialog form that allows for exporting the contents of a Folder into an eligible Compendium pack.

    Parameters

    • pack: string

      A pack ID to set as the default choice in the select input

    • options: any = {}

      Additional options passed to the Dialog.prompt method

    Returns Promise<void>

    A Promise which resolves or rejects once the dialog has been submitted or closed

  • getSubfolders(recursive?: boolean): Folder[]
  • Get the Folder documents which are sub-folders of the current folder, either direct children or recursively.

    Parameters

    • recursive: boolean = false

    Returns Folder[]

    An array of Folder documents which are subfolders of this one

  • _onDelete(options: any, userId: any): any
  • inheritdoc

    Parameters

    • options: any
    • userId: any

    Returns any

  • createDialog(data?: any, options?: {}): Promise<Folder>
  • Present a Dialog form to create a new Folder.

    see

    ClientDocumentMixin.createDialog

    Parameters

    • data: any = {}

      Initial data with which to populate the creation form

    • options: {} = {}

      Returns Promise<Folder>

      A Promise which resolves to the created Folder, or null if the dialog was closed.