mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Add module.getModuleAdminScopes (after) event
This commit is contained in:
parent
a2e5434aec
commit
64b0d97fbb
2 changed files with 17 additions and 2 deletions
|
|
@ -197,6 +197,8 @@ class ModuleAdminModel extends Module
|
|||
// Extract admin ID set in the current module
|
||||
$admin_member = ModuleModel::getAdminId($module_srl) ?: [];
|
||||
Context::set('admin_member', $admin_member);
|
||||
// Get defined scopes
|
||||
Context::set('manager_scopes', $this->getModuleAdminScopes());
|
||||
// Get a list of groups
|
||||
$group_list = MemberModel::getGroups();
|
||||
Context::set('group_list', $group_list);
|
||||
|
|
@ -286,6 +288,19 @@ class ModuleAdminModel extends Module
|
|||
$this->add('grantList', $grantList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get defined scopes of module admin.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getModuleAdminScopes(): array
|
||||
{
|
||||
$obj = new \stdClass;
|
||||
$obj->scopes = lang('module.admin_scopes')->getArrayCopy();
|
||||
ModuleHandler::triggerCall('module.getModuleAdminScopes', 'after', $obj);
|
||||
return $obj->scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Common:: skin setting page for the module
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue