Panel Settings and Tool Hooks

1 views Markdown

The thirty-seven placement points of the settings, staff, module, automation and tool screens: tab points, forms and toolbars.

Overview

The placement points of the settings, staff, module, automation and tool screens live here.

What marks this group out is how many tab points it holds: the general, security, tax, account, automation and staff settings each carry their own. All of them hand you an object rather than HTML, and the tab is added through a method call.

Reference

A new tab in the general settings

uiadmin.settings.tabs
admin/settings an object, not an array

Runs once the general settings tabs are built.

Parameters 1
$tabobjectThe tab object; add a tab through its method.
Return 1
voidThe return is not used. This point shows no HTML: the tab is added through the object’s method.
Listener
Hook::add('ui:admin.settings.tabs', 10, function ($tab) {
    $tab->add('acme', 'Acme', Acme::renderSettings());
});

A new tab in the security settings

uiadmin.security_settings.tabs
admin/settings an object, not an array

Runs once the security settings tabs are built.

Parameters 1
$tabobjectThe tab object; add a tab through its method.
Return 1
voidThe return is not used. This point shows no HTML: the tab is added through the object’s method.
Listener
Hook::add('ui:admin.security_settings.tabs', 10, function ($tab) {
    $tab->add('acme-sec', 'Acme', Acme::renderSecurity());
});

A new tab in the tax settings

uiadmin.taxation_settings.tabs
admin/settings an object, not an array

Runs once the tax settings tabs are built.

Parameters 1
$tabobjectThe tab object; add a tab through its method.
Return 1
voidThe return is not used. This point shows no HTML: the tab is added through the object’s method.
Listener
Hook::add('ui:admin.taxation_settings.tabs', 10, function ($tab) {
    $tab->add('acme-tax', 'Acme', Acme::renderTax());
});

A new tab in the account settings

uiadmin.account_settings.tabs
admin/settings an object, not an array

Runs once the tabs of an administrator’s own account settings are built.

Parameters 2
$tabobjectThe tab object; add a tab through its method.
$udataarrayThe signed-in administrator’s data.
Return 1
voidThe return is not used. This point shows no HTML: the tab is added through the object’s method.
Listener
Hook::add('ui:admin.account_settings.tabs', 10, function ($tab, $udata) {
    $tab->add('acme-me', 'Acme', Acme::renderMyPrefs((int) ($udata['id'] ?? 0)));
});

A new tab in the automation settings

uiadmin.automation_settings.tabs
admin/automation an object, not an array

Runs once the automation settings tabs are built.

Parameters 1
$tabobjectThe tab object; add a tab through its method.
Return 1
voidThe return is not used. This point shows no HTML: the tab is added through the object’s method.
Listener
Hook::add('ui:admin.automation_settings.tabs', 10, function ($tab) {
    $tab->add('acme-cron', 'Acme', Acme::renderCronSettings());
});

A new tab on the staff form

uiadmin.staff_edit.tabs
admin/staff an object, not an array

Runs once the staff edit tabs are built.

Parameters 2
$tabobjectThe tab object; add a tab through its method.
$detailarrayThe staff record. ? There is no id when creating: test before adding a tab that depends on one.
Return 1
voidThe return is not used. This point shows no HTML: the tab is added through the object’s method.
Listener
Hook::add('ui:admin.staff_edit.tabs', 10, function ($tab, $detail) {
    // Ekleme modunda kimlik YOK.
    if (!($detail['id'] ?? 0)) return;

    $tab->add('acme', 'Acme', Acme::renderStaffTab((int) $detail['id']));
});

A new tab in the action logs

uiadmin.tools_actions_list.tabs
admin/tools a different method

Runs once the action log tabs are built.

Parameters 1
$tabobjectThe tab object. ? On this screen a tab is added through a different method; calling the one used at the sibling points does nothing here.
Return 1
voidThe return is not used. This point shows no HTML: the tab is added through the object’s method.
Listener
Hook::add('ui:admin.tools_actions_list.tabs', 10, function ($tab) {
    // Bu ekranda metot farkli.
    $tab->set('acme', 'Acme', Acme::renderActions());
});

The bottom of the general settings

uiadmin.settings.bottom
admin/settings no parameters

Appears at the very bottom of the general settings page.

Parameters 0
It takes no parameters.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.settings.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

The staff list toolbar

uiadmin.staff_list.toolbar
admin/staff no parameters

Appears in the toolbar of the staff list.

Parameters 0
It takes no parameters.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.staff_list.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the table on the staff list

uiadmin.staff_list.before_table
admin/staff no parameters

Appears immediately above the staff table.

Parameters 0
It takes no parameters.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.staff_list.before_table', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

The privilege list toolbar

uiadmin.privilege_list.toolbar
admin/staff no parameters

Appears in the toolbar of the privilege group list.

Parameters 0
It takes no parameters.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.privilege_list.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the table on the privilege list

uiadmin.privilege_list.before_table
admin/staff no parameters

Appears immediately above the privilege table.

Parameters 0
It takes no parameters.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.privilege_list.before_table', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

The add-on list toolbar

uiadmin.tools_addons_list.toolbar
admin/tools no parameters

Appears in the toolbar of the add-on list.

Parameters 0
It takes no parameters.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.tools_addons_list.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

The task list toolbar

uiadmin.tools_tasks_list.toolbar
admin/tools no parameters

Appears in the toolbar of the panel task list.

Parameters 0
It takes no parameters.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.tools_tasks_list.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the staff form

uiadmin.staff_edit.before_content
admin/staff empty when creating

Appears above the staff add and edit form.

Parameters 1
$detailarrayThe staff record being edited. It is empty when creating.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.staff_edit.before_content', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Below the staff form

uiadmin.staff_edit.bottom
admin/staff empty when creating

Appears below the same form.

Parameters 1
$detailarrayThe staff record being edited. It is empty when creating.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.staff_edit.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the privilege form

uiadmin.privilege_edit.before_content
admin/staff empty when creating

Appears above the privilege group form.

Parameters 1
$detailarrayThe privilege record: its name and permissions. It is empty when creating.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.privilege_edit.before_content', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Below the privilege form

uiadmin.privilege_edit.bottom
admin/staff empty when creating

Appears below the same form.

Parameters 1
$detailarrayThe privilege record: its name and permissions. It is empty when creating.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.privilege_edit.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the add-on settings

uiadmin.addon_configure.before
admin/modules on every add-on

Appears on the add-on settings page, above the module’s own content.

Parameters 2
$moduleobjectThe module instance; you may query its methods.
$module_dataarrayThe record and configuration of the module: name, version and settings. The settings can hold an API key: keep it off the screen.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.addon_configure.before', 10, function ($module, $module_data) {
    // Kanca HER eklentinin ayar sayfasinda calisir: kendinizinkini secin.
    if (($module_data['name'] ?? '') !== 'Acme') return null;

    return '<div class="alert alert-info">Acme</div>';
});

Below the add-on settings

uiadmin.addon_configure.after
admin/modules on every add-on

Appears on the same page, below the module’s content.

Parameters 2
$moduleobjectThe module instance; you may query its methods.
$module_dataarrayThe record and configuration of the module: name, version and settings. The settings can hold an API key: keep it off the screen.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.addon_configure.after', 10, function ($module, $module_data) {
    // Kanca HER eklentinin ayar sayfasinda calisir: kendinizinkini secin.
    if (($module_data['name'] ?? '') !== 'Acme') return null;

    return '<div class="alert alert-info">Acme</div>';
});

Above the module settings

uiadmin.module_settings.before
admin/modules on every module

Appears above the content on the module configuration page.

Parameters 2
$moduleobjectThe module being configured.
$module_dataarrayThe data and configuration of the module.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.module_settings.before', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Below the module settings

uiadmin.module_settings.after
admin/modules on every module

Appears below the content on the same page.

Parameters 2
$moduleobjectThe module being configured.
$module_dataarrayThe data and configuration of the module.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.module_settings.after', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the module page

uiadmin.module_page.before
admin/modules the instance may be empty

Appears above the content on a module’s own management page.

Parameters 2
$module_keystringThe key of the active module.
$moduleobjectThe admin area instance of the module. ? On some paths it arrives empty: test before calling a method.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.module_page.before', 10, function ($module_key, $module) {
    // Ornek BOS gelebilir.
    if (!$module) return null;

    return Acme::renderModuleBanner($module_key);
});

Below the module page

uiadmin.module_page.after
admin/modules the instance may be empty

Appears below the content on the same page.

Parameters 2
$module_keystringThe key of the active module.
$moduleobjectThe admin area instance of the module. ? On some paths it arrives empty: test before calling a method.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.module_page.after', 10, function ($module_key, $module) {
    // Ornek BOS gelebilir.
    if (!$module) return null;

    return Acme::renderModuleBanner($module_key);
});

The module list toolbar

uiadmin.module_list.toolbar
admin/modules the group arrives

Appears in the toolbar of the module list.

Parameters 1
$group_namestringThe active module group: mail, text message, payment, registrar, product or fraud check. The same list serves every group.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.module_list.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the grid on the module list

uiadmin.module_list.before_grid
admin/modules above the grid

Appears above the module cards.

Parameters 2
$modulesarrayThe data of the modules being listed.
$group_namestringThe active module group.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.module_list.before_grid', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the theme settings

uiadmin.theme_settings.before
admin/settings the theme instance

Appears above the content on the theme configuration page.

Parameters 1
$themeobjectThe theme being configured.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.theme_settings.before', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Below the theme settings

uiadmin.theme_settings.after
admin/settings the theme instance

Appears below the content on the same page.

Parameters 1
$themeobjectThe theme being configured.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.theme_settings.after', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

The bottom of the automation board

uiadmin.automation_dashboard.bottom
admin/automation the queue counters

Appears at the very bottom of the scheduled task board.

Parameters 1
$statsarrayThe board data: system state and queue counters.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.automation_dashboard.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

The bottom of the automation system tab

uiadmin.automation_settings.system_tab.bottom
admin/automation carries a secret key

Appears below the scheduled task system settings.

Parameters 1
$configarrayThe whole task configuration. ? It holds the secret key that guards the cron address. Whoever sees it can trigger the tasks from outside: keep it off the screen and out of your logs.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.automation_settings.system_tab.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Adding an operation to a task card

uiadmin.automation_task_card.actions
admin/automation per task

Appears in the operation area of the scheduled task cards, separately for every task.

Parameters 1
$taskarrayThe data of one task: its name, frequency, pending and failed counts, and whether it is switched off. The hook runs per task: keep heavy work out of it.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.automation_task_card.actions', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

The analytics overview toolbar

uiadmin.analytics.overview.toolbar
admin/analytics section and range

Appears in the toolbar of the report overview page.

Parameters 2
$sectionstringThe active section: clients, services or support.
$rangearrayThe active date range.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.analytics.overview.toolbar', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

The bottom of an analytics report

uiadmin.analytics.report.bottom
admin/analytics the range may be empty

Appears at the very bottom of a report page.

Parameters 2
$reportstringThe active report key.
$rangearrayThe active date range. It arrives empty on reports that use no date range.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.analytics.report.bottom', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Adding an operation to the distribution card

uiadmin.analytics.distribution_card.actions
admin/analytics the distribution card

Appears in the operation area of the distribution chart.

Parameters 1
$entitystringWhat is distributed: clients, services or tickets.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.analytics.distribution_card.actions', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the import wizard

uiadmin.tools_imports_wizard.before_content
admin/tools the platform list

Appears above the import wizard.

Parameters 1
$platformsarrayThe import platforms installed.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.tools_imports_wizard.before_content', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Below the licence details

uiadmin.help_license.after
admin/tools licence details

Appears below the licence information screen.

Parameters 1
$license_infoarrayThe licence details: owner, product, the address it is locked to and its dates.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.help_license.after', 10, function () {
    return '<div class="alert alert-info">Acme</div>';
});

Above the updates screen

uiadmin.help_updates.before_content
admin/tools may be false

Appears above the version update screen.

Parameters 1
$new_versionmixedDetails of the new version found. With no new version it arrives as false rather than an array: test before reading a field.
Return 1
string|nullThe HTML you return appears. With several listeners the outputs are appended one after another in priority order. Empty text, null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.
Listener
Hook::add('ui:admin.help_updates.before_content', 10, function ($new_version) {
    // Yeni surum yoksa dizi degil YANLIS gelir.
    if (!is_array($new_version)) return null;

    return '<div class="alert alert-info">Acme uyumluluk notu</div>';
});

Pitfalls

The action log screen uses a different tab method

Every tab point looks alike, but the action log screen uses another method. Code copied from a sibling point quietly does nothing here: no error appears, and neither does the tab.

The automation configuration carries a secret key

The configuration array on the system tab holds the secret key that guards the scheduled task address. Printing it to the screen or copying it into your own store makes the tasks triggerable from outside.

Was this helpful?

Thanks for your feedback!

Still Need Help?

Our support team is here around the clock for anything you can't find above.