Administration Links

Overview

Managing administration links.
Administration links are the links located in the admin section of Sugar. As of 6.3.x, administration links can be created using the extension framework. The global links extension directory is located at ./custom/Extension/modules/Administration/Ext/Administration/PHP files found is this directory will be compiled into ./custom/modules/Administration/Ext/Administration/administration.ext.php after a Quick Repair and Rebuild.Additional information on this can be found in the extensions Administration section. The current links defined in the administration section can be found in ./modules/Administration/metadata/adminpaneldefs.php.

Example

The following example will create a new admin panel:
./custom/Extension/modules/Administration/Ext/Administration/<file>.php
<?php

    $admin_option_defs = array();
    $admin_option_defs['Administration']['<section key>'] = array(
        //Icon name. Available icons are located in ./themes/default/images
        'Administration',
        
        //Link name label 
        'LBL_LINK_NAME',
        
        //Link description label
        'LBL_LINK_DESCRIPTION',
        
        //Link URL
        './index.php?module=<module>&action=<action>',
    );

    $admin_group_header[] = array(
        //Section header label
        'LBL_SECTION_HEADER',
        
        //$other_text parameter for get_form_header()
        '',
        
        //$show_help parameter for get_form_header()
        false,
        
        //Section links
        $admin_option_defs, 
        
        //Section description label
        'LBL_SECTION_DESCRIPTION'
    );
Next, we will populate the panel label values:
./custom/Extension/modules/Administration/Ext/Language/en_us.<name>.php
<?php

    $mod_strings['LBL_LINK_NAME'] = 'Link Name';
    $mod_strings['LBL_LINK_DESCRIPTION'] = 'Link Description';
    $mod_strings['LBL_SECTION_HEADER'] = 'Section Header';
    $mod_strings['LBL_SECTION_DESCRIPTION'] = 'Section Description';
Finally, navigate to Admin > Repair > Quick Repair and Rebuild. The system will then rebuild the extensions and the panel will appear in the Admin section.