Skip to content

Commit

Permalink
Use my dashboard
Browse files Browse the repository at this point in the history
Fix checker
  • Loading branch information
trasher committed Oct 16, 2024
1 parent 251ca6c commit bbb9f8c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions .composer-require-checker.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

"// Galette constants (not detected as they are dynamically declared)",
"GALETTE_ATTACHMENTS_PATH",
"GALETTE_ADAPTATIVE_CARDS",
"GALETTE_BASE_PATH",
"GALETTE_CACHE_DIR",
"GALETTE_CARD_COLS",
Expand Down
2 changes: 1 addition & 1 deletion _define.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'Maps features', //Short description
'Johan Cwiklinski', //Author
'2.1.0', //Version
'1.1.0', //Galette compatible version
'1.1.4', //Galette compatible version
'maps', //routing name and translation domain
'2024-06-08', //Release date
[ //Permissions needed
Expand Down
18 changes: 12 additions & 6 deletions lib/GaletteMaps/PluginGaletteMaps.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,15 @@ public static function getPublicMenusItemsList(): array
}

/**
* Get dashboards contents
* Get current logged-in user dashboards contents
*
* @return array<int, string|array<string,mixed>>
*/
public static function getDashboardsContents(): array
public static function getMyDashboardsContents(): array
{
/** @var Login $login */
global $login;

if ($login->isSuperAdmin()) {
return [];
}

return [
[
'label' => _T("My localization", "maps"),
Expand All @@ -106,6 +102,16 @@ public static function getDashboardsContents(): array
];
}

/**
* Get dashboards contents
*
* @return array<int, string|array<string,mixed>>
*/
public static function getDashboardsContents(): array
{
return [];
}

/**
* Get actions contents
*
Expand Down

0 comments on commit bbb9f8c

Please sign in to comment.