Skip to content

Instantly share code, notes, and snippets.

@jmertic
Created March 9, 2011 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmertic/862790 to your computer and use it in GitHub Desktop.
Save jmertic/862790 to your computer and use it in GitHub Desktop.
<?php
$layout_defs['Accounts']['subpanel_setup']['custom_meetings'] = array(
'order' => 10,
'sort_order' => 'desc',
'sort_by' => 'date_start',
'title_key' => 'LBL_MEETINGS_SUBPANEL_TITLE',
'subpanel_name' => 'custom_meetings', // not a real file name because
'type' => 'collection', // this is a collection
'module' => 'Meetings',
'collection_list' => array(
'meetings_contacts' => array(
'subpanel_name' => 'ForAccounts',
'module' => 'Meetings',
'get_subpanel_data' => 'function:get_all_meetings_related', // here custom method defined
'generate_select' => true, // to build custom SQL query
'function_parameters' => array('return_as_array' => 'true'), // to get data for subpanel collection item
),
'meetings_accounts' => array(
'subpanel_name' => 'ForAccounts',
'module' => 'Meetings',
'get_subpanel_data' => 'meetings', // here is default getting data from DB table
),
),
);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment