Skip to content

Instantly share code, notes, and snippets.

@smalyshev
Last active August 29, 2015 14:04
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 smalyshev/553c8b967fdb4419cfef to your computer and use it in GitHub Desktop.
Save smalyshev/553c8b967fdb4419cfef to your computer and use it in GitHub Desktop.
<?php
array(
'invitees' => array(
'name' => 'invitees',
'source' => 'non-db',
'type' => 'link_field',
'link' => 'meeting_invitees',
'fields' => ['id', 'name', 'picture', 'status']
'sort_on' => 'name'
)
);
array(
'layout' => 'collection-subpanel',
'label' => 'LBL_WEEK_ACTIVITIES_SUBPANEL',
// This subpanel def resides in PARENT module, e.g. Calendar
// This defines headers, footers, etc. and also the field list
'override_subpanel_list_view' => 'subpanel-for-calendar',
'context' => array(
'collection' => 'meeting_invitees',
'links' => array(
// Optional override for each link, specific for this subpanel
// If not used, fields from layout in the main definition are used
'calls' => array(
// This subpanel def resides in Calls
'override_subpanel_list_view' => 'subpanel-for-calendar',
),
),
),
)
$a = [
'meeting_invitees' => array(
'name' => 'meeting_invitees',
'source' => 'non-db',
'type' => 'collection',
'vname' => 'LBL_MEETING_INVITEES',
'links' => array(
'calls', 'meetings',
array(
'name' => 'tasks',
'field_map' => array(
// virtual field => real field
'date_end' => 'date_due',
)
),
),
),
'sort_on' => 'date_end'
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment