Constants

OPTION_NAME_CLICKED_ACTIONS

OPTION_NAME_CLICKED_ACTIONS =RCB_OPT_PREFIX . '-migration-actions-clicked'

Properties

$id

$id :

Type

$actions

$actions :

A set of actions which can be made within this migration.

See also $this::addAction.

Type

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

Returns

string

__construct()

__construct()

C'tor. Register your actions with `$this::addAction` here!

getId()

getId(): string

Get a unique id for this migration.

Returns

string

getHeadline()

getHeadline(): string

Get a headline for this migration.

Returns

string

getDescription()

getDescription(): string

Get a description for this migration.

Returns

string

isActive()

isActive(): boolean

Check if this migration is active.

Returns

boolean

actions()

actions(): void

`addAction()` your actions here.

dismiss()

dismiss(): boolean

Dismiss this migration.

Returns

boolean

addAction()

addAction(string  $id,string  $title,string  $description,array  $args = array())

Register a new action which can be made for this migration.

Arguments:

  • [linkText] (string) Can be null to disable the link
  • [confirmText] (string) The user needs to confirm this migration with something like "Are you sure?"
  • [callback] (callback|string) Can be null, a callback which is executed when clicking the link or a direct URL
  • [previewImage] (string) Absolute URL to preview image

Parameters

string $id

Unique action ID

string $title
string $description
array $args

Arguments, see above

saveActionPerformed()

saveActionPerformed(string  $id)

Save an action as "performed" so we can show this in the UI.

Parameters

string $id

revisionCurrent()

revisionCurrent(array  $array)

Get the migration as plain array so it can be consumed in the frontend.

Parameters

array $array

getConfigUrl()

getConfigUrl(string  $route)

Get a config URL pointing to a given route (react-router).

Parameters

string $route

hasMajorPreviouslyInstalled()

hasMajorPreviouslyInstalled(integer  $majorVersion)

Check if a given major version was previously installed.

Parameters

integer $majorVersion

removeMajorVersionFromPreviouslyInstalled()

removeMajorVersionFromPreviouslyInstalled(integer  $majorVersion)

Dismiss the migration by removing a major version from the previously installed versions.

Parameters

integer $majorVersion

deleteCustomizerTexts()

deleteCustomizerTexts(array<mixed,string>  $languages,array<mixed,string>  $ids): array<mixed,string>

Delete customizer texts for given languages and option keys.

Parameters

array<mixed,string> $languages
array<mixed,string> $ids

Returns

array<mixed,string> —

Deleted option keys

doDismiss()

doDismiss(string  $migrationId)

Dismiss a migration by ID.

Parameters

string $migrationId

doRegisterActions()

doRegisterActions()

Register all actions with `AbstractDashboardTileMigration#actions()` method.

doAction()

doAction(string  $migrationId,string  $actionId)

Start a given migration by ID.

Parameters

string $migrationId
string $actionId

init()

init()

Initialize hooks.