- 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
22 lines
742 B
Go
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},
|
|
}
|
|
}
|