Important Services

This page lists important services, their types, how to get them and their purpose.

JavaScript

Frontend

There are no predefined

Backend

You fetch services in your bundle via this.get<Translator>("translator") or in your component via:

import app from "@mayd/app";

function doSth ()
{
    const translator = app.get<Translator>("translator");
    // ...
}

Core Services

Key

Type

Usage

confirm

Confirm

Confirm handler, to trigger a confirm dialog.

crud.action-handlers

ActionHandlers

Registry for action handlers in CRUDs.

crud.field-handlers

FieldHandlers

Registry for field handlers (= renderers) in CRUDs.

date.formatter

DateFormatter

Global date formatter, to consistently format dates.

fetch

BackendFetch

Main fetch client for all network activity.

form.widgets

FormWidgets

Initializes form widgets in a container. If you load HTML via AJAX, you need to call it for the new DOM.

hyperlink.handlers

HyperlinkTypeRegistry

Registry for all hyperlink handlers.

loader

GlobalLoader

Used for triggering a global loading overlay.

meta-title

MetaTitle

Used for dynamically modifying the meta title.

modal

ModalController

Open modals or automatically load and open modal forms.

overlay-selector

OverlaySelectorManager

Displays an overlay selector.

router

Router

Router for all backend routes.

scroller

Scroller

Helper to scroll elements / positions.

slug

Slug

Slugger, if you need to generate slugs.

toasts

ToastManager

For displaying toasts in the backend.

translator

Translator

Translator for all backend translations.

Table of Contents