Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20205 - Expose current employer id to views #433

Merged
merged 1 commit into from
Jun 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions modules/views/components/civicrm.core.inc
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,26 @@ function _civicrm_core_data(&$data, $enabled) {
),
);

//Current Employer ID
$data['civicrm_contact']['employer_id'] = array(
'title' => t('Current Employer Id'),
'help' => t('Current Employer Id'),
'field' => array(
'handler' => 'civicrm_handler_field_contact_link',
'click sortable' => TRUE,
),
'argument' => array(
'handler' => 'views_handler_argument_string',
),
'filter' => array(
'handler' => 'views_handler_filter_string',
'allow empty' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);

//DISPLAY Name for the Contact (Full Name with Prefixes and Suffixes)
$data['civicrm_contact']['display_name'] = array(
'title' => t('Display Name'),
Expand Down