Documentation

AbstractDashboardTileMigration
in package
Uses UtilsProvider

AbstractYes

Allow to define a list of migrations in our dashboard.

Table of Contents

Constants

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

Properties

$actions  : mixed
A set of actions which can be made within this migration.
$id  : mixed

Methods

__construct()  : mixed
C'tor. Register your actions with `$this::addAction` here!
actions()  : void
`addAction()` your actions here.
addAction()  : mixed
Register a new action which can be made for this migration.
applyNewGroupTexts()  : mixed
Upgrade the group texts for a list of languages.
deleteCustomizerTexts()  : array<string|int, string>
Delete customizer texts for given languages and option keys.
dismiss()  : bool
Dismiss this migration.
doAction()  : mixed
Start a given migration by ID.
doDismiss()  : mixed
Dismiss a migration by ID.
doRegisterActions()  : mixed
Register all actions with `AbstractDashboardTileMigration#actions()` method.
getConfigUrl()  : mixed
Get a config URL pointing to a given route (react-router).
getDescription()  : string
Get a description for this migration.
getHeadline()  : string
Get a headline for this migration.
getId()  : string
Get a unique id for this migration.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
hasMajorPreviouslyInstalled()  : mixed
Check if a given major version was previously installed.
isActive()  : bool
Check if this migration is active.
removeMajorVersionFromPreviouslyInstalled()  : mixed
Dismiss the migration by removing a major version from the previously installed versions.
revisionCurrent()  : mixed
Get the migration as plain array so it can be consumed in the frontend.
saveActionPerformed()  : mixed
Save an action as "performed" so we can show this in the UI.
scanWebsiteAgain()  : mixed
Start the scanner and redirect to scanner tab.
applyNewGroupTextsForLanguage()  : mixed
Upgrade the group texts for a given language.
init()  : mixed
Initialize hooks.

Constants

Properties

Methods

addAction()

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

public addAction(string $id, string $title, string $description[, array<string|int, mixed> $args = [] ]) : mixed

Arguments:

  • [linkText] (string) Can be null to disable the link
  • [linkClasses="button"] (string) Class name for the button
  • [linkDisabled] (boolean|"performed") Disable the action link
  • [performed] (boolean) Force to show "Already applied!"
  • [performedLabel] (string) Change the text of "Already applied!"
  • [needsPro] (boolean) The action is only available in PRO version
  • [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
  • [info] (string) Show an additional info notice
Parameters
$id : string

Unique action ID

$title : string
$description : string
$args : array<string|int, mixed> = []

Arguments, see above

applyNewGroupTexts()

Upgrade the group texts for a list of languages.

public applyNewGroupTexts(array<string|int, string> $deleteLanguages) : mixed
Parameters
$deleteLanguages : array<string|int, string>

deleteCustomizerTexts()

Delete customizer texts for given languages and option keys.

public deleteCustomizerTexts(array<string|int, string> $languages, array<string|int, string> $ids) : array<string|int, string>
Parameters
$languages : array<string|int, string>
$ids : array<string|int, string>
Return values
array<string|int, string>

Deleted option keys

doAction()

Start a given migration by ID.

public static doAction(string $migrationId, string $actionId) : mixed
Parameters
$migrationId : string
$actionId : string

doRegisterActions()

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

public static doRegisterActions() : mixed

getConfigUrl()

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

public getConfigUrl(string $route) : mixed
Parameters
$route : string

getPluginConstantPrefix()

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

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

hasMajorPreviouslyInstalled()

Check if a given major version was previously installed.

public hasMajorPreviouslyInstalled(int $majorVersion) : mixed
Parameters
$majorVersion : int

removeMajorVersionFromPreviouslyInstalled()

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

public removeMajorVersionFromPreviouslyInstalled(int $majorVersion) : mixed
Parameters
$majorVersion : int

revisionCurrent()

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

public revisionCurrent(array<string|int, mixed> $array) : mixed
Parameters
$array : array<string|int, mixed>

saveActionPerformed()

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

public saveActionPerformed(string $id) : mixed
Parameters
$id : string

scanWebsiteAgain()

Start the scanner and redirect to scanner tab.

public scanWebsiteAgain(array<string|int, mixed> $result) : mixed
Parameters
$result : array<string|int, mixed>

applyNewGroupTextsForLanguage()

Upgrade the group texts for a given language.

protected applyNewGroupTextsForLanguage(array<string|int, string> $deleteLanguages, string $locale) : mixed
Parameters
$deleteLanguages : array<string|int, string>
$locale : string

        
On this page

Search results