core/addblockmodal

Show an add block modal instead of doing it on a separate page.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Methods

(inner) buildAddBlockModal() → {Promise}

Source:

Method that creates the 'add block' modal.

Returns:

The modal promise (modal's body will be rendered later).

Type
Promise

(inner) getAddableBlocks(pageType, pageLayout, subPage) → {Promise}

Source:

Method that fetches all addable blocks in a given page.

Parameters:
Name Type Description
pageType String

The type of the page

pageLayout String

The layout of the page

subPage String

The subpage identifier

Returns:
Type
Promise

(inner) init(pageType, pageLayout, addBlockUrl, subPage)

Source:

Set up the actions.

Parameters:
Name Type Description
pageType String

The type of the page

pageLayout String

The layout of the page

addBlockUrl String | null

The add block URL

subPage String

The subpage identifier

(inner) registerListenerEvents(pageType, pageLayout, addBlockUrl, subPage)

Source:

Register related event listeners.

Parameters:
Name Type Description
pageType String

The type of the page

pageLayout String

The layout of the page

addBlockUrl String | null

The add block URL

subPage String

The subpage identifier

(inner) renderBlocks(addBlockUrl, pageType, pageLayout, subPage) → {Promise}

Source:

Method that renders the list of available blocks.

Parameters:
Name Type Description
addBlockUrl String

The add block URL

pageType String

The type of the page

pageLayout String

The layout of the page

subPage String

The subpage identifier

Returns:
Type
Promise