Class ThemeAbstract

Base class of all themes.

The theme class controls which files will be created through the Theme.getUrls function. It returns an array of UrlMapping instances defining the target files, models and templates to use. Additionally themes can subscribe to the events emitted by Renderer to control and manipulate the output process.

Hierarchy (view full)

Constructors

Properties

componentName: string

The name of this component as set by the @Component decorator.

Accessors

  • get owner(): O
  • Return the owner of this component.

    Returns O

Methods

  • Map the models of the given project to the desired output files. It is assumed that with the project structure:

    A
    |- B
       |- C
    

    If B has a UrlMapping, then A also has a UrlMapping, and C may or may not have a UrlMapping. If B does not have a UrlMapping, then A may or may not have a UrlMapping, but C must not have a UrlMapping.

    Parameters

    Returns UrlMapping<Models.Reflection>[]

    A list of UrlMapping instances defining which models should be rendered to which files.

  • Initialize this component.

    Returns void

  • Stops listening to an event.

    Type Parameters

    • K extends never

    Parameters

    • event: K

      the event to stop listening to.

    • listener: ((this: undefined, ...args: {}[K]) => void)

      the function to remove from the listener array.

        • (this, ...args): void
        • Parameters

          • this: undefined
          • Rest...args: {}[K]

          Returns void

    Returns void

  • Starts listening to an event.

    Type Parameters

    • K extends never

    Parameters

    • event: K

      the event to listen to.

    • listener: ((this: undefined, ...args: {}[K]) => void)

      function to be called when an this event is emitted.

        • (this, ...args): void
        • Parameters

          • this: undefined
          • Rest...args: {}[K]

          Returns void

    • priority: number = 0

      optional priority to insert this hook with.

    Returns void

  • Emits an event to all currently subscribed listeners.

    Type Parameters

    • K extends never

    Parameters

    • event: K

      the event to emit.

    • Rest...args: {}[K]

      any arguments required for the event.

    Returns void