Skip to content

Instantly share code, notes, and snippets.

@eggsurplus
Created July 23, 2014 15:59
Show Gist options
  • Save eggsurplus/75e42d632098cdc88266 to your computer and use it in GitHub Desktop.
Save eggsurplus/75e42d632098cdc88266 to your computer and use it in GitHub Desktop.
Reuse admin panel
<?php
//check for existing installed modules
$mycompany_admin_options_defs = array();
if(!empty($admin_group_header['MyCompany']))
{
$mycompany_admin_options_defs = $admin_group_header['MyCompany'][3];
}
//add this module to it
$mycompany_admin_options_defs['Administration']['thismodule_license']= array('helpInline','LBL_THISMODULE_LICENSE_TITLE','LBL_THISMODULE_LICENSE','./index.php?module=ThisModule&action=license');
//save the admin panel
$admin_group_header['MyCompany'] = array('LBL_MYCOMPANY_MODULES', '', false, $mycompany_admin_options_defs, 'LBL_MYCOMPANY_MODULES_DESC');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment