Created
November 2, 2012 03:10
-
-
Save chadhutchins/3998495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// initialize a temp array that will hold the options we want to create | |
$links = array(); | |
// add button1 to $links | |
$links['abc_Module']['link1'] = array( | |
// pick an image from /themes/Sugar5/images | |
// and drop the file extension | |
'Releases', | |
// title of the link | |
'Link 1 Title', | |
// description for the link | |
'The description for what link 1 will do. Put whatever you want here.', | |
// where to send the user when the link is clicked | |
'./index.php?module=abc_Module&action=link1_action', | |
); | |
// add link2 to $links | |
// this link uses labels instead of hard-coded strings | |
// since this is in the scope of the Administration module, | |
// you need to add these labels to the | |
// Administration lang files in | |
// /custom/Extension/modules/Administration/Ext/Language/abc_Module.php | |
$links['abc_Module']['link2'] = array( | |
// pick an image from /themes/Sugar5/images | |
// and drop the file extension | |
'CallReports', | |
// defined in /custom/Extension/modules/Administration/Ext/Language/abc_Module.php | |
'LBL_ABC_MODULE_LINK2_TITLE', | |
// defined in /custom/Extension/modules/Administration/Ext/Language/abc_Module.php | |
'LBL_ABC_MODULE_LINK2_DESCRIPTION', | |
// where to send the user when the link is clicked | |
'./index.php?module=abc_Module&action=link2_action', | |
); | |
// add our new admin section to the main admin_group_header array | |
$admin_group_header []= array( | |
// The title for the group of links | |
'abc_Module Admin Options', | |
// leave empty, it's used for something in /include/utils/layout_utils.php | |
// in the get_module_title() function | |
'', | |
// set to false, it's used for something in /include/utils/layout_utils.php | |
// in the get_module_title() function | |
false, | |
// the array of links that you created above | |
// to be placed in this section | |
$links, | |
// a description for what this section is about | |
'The description for what abc_Module configuration options can do for you.' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment