Files
sm-menu-plugin/controllers/admin_registry.go
Jakub Zych 559d96b0a4 feat(19.3-04): purge the host site's page cache after menu and menu-entry saves, deletes and reorders
- menus controller gains the app accessor and FormAfterCreate/Update/Delete
  purging kind menu with the menu code
- menu entries purge kind menu_entry with the entry id after the placement
  checks pass, on delete, and through pact.ReorderAfterSave with
  partition:<menu id>
- purgeSiteCache helper on cabana.TxFromContext and cooler.SiteCacheFromApp
- TestMenuAdminPurgesSiteCache on Postgres
2026-10-15 18:30:45 +02:00

22 lines
742 B
Go

// Package controllers holds the menu plugin's admin controllers.
package controllers
import (
"git.golem15.com/golem15/summercms/modules/backpack"
"git.golem15.com/golem15/summercms/modules/pact"
)
// PermissionManageMenu is the PHP permission golem15.menu.manage_menu; both
// screens require it.
const PermissionManageMenu = "golem15.menu.manage_menu"
// AdminControllers is the plugin's admin controller list. app returns the
// booted application; it is asked on every call, so a controller never keeps
// a database handle or registry of its own.
func AdminControllers(app func() *backpack.App) []pact.AdminController {
return []pact.AdminController{
menusAdminController{app: app},
menuEntriesAdminController{app: app},
}
}