protected $_summary = NULL;
protected $_customGroupExtends = array(
- 'Contact', 'Individual');
+ 'Contact',
+ 'Individual'
+ );
public $_drilldownReport = array('contact/detail' => 'Link to Detail Report');
function __construct() {
$this->_columns = array(
- 'civicrm_employer' =>
- array(
+ 'civicrm_employer' => array(
'dao' => 'CRM_Contact_DAO_Contact',
- 'fields' =>
- array(
- 'organization_name' =>
- array('title' => ts('Employer Name'),
+ 'fields' => array(
+ 'organization_name' => array(
+ 'title' => ts('Employer Name'),
'required' => TRUE,
'no_repeat' => TRUE,
),
- 'id' =>
- array(
+ 'id' => array(
'no_display' => TRUE,
'required' => TRUE,
),
),
- 'filters' =>
- array(
- 'organization_name' =>
- array('title' => ts('Employer Name'),
+ 'filters' => array(
+ 'organization_name' => array(
+ 'title' => ts('Employer Name'),
'operatorType' => CRM_Report_Form::OP_STRING,
),
),
),
- 'civicrm_contact' =>
- array(
+ 'civicrm_contact' => array(
'dao' => 'CRM_Contact_DAO_Contact',
- 'fields' =>
- array(
- 'sort_name' =>
- array('title' => ts('Employee Name'),
+ 'fields' => array(
+ 'sort_name' => array(
+ 'title' => ts('Employee Name'),
'required' => TRUE,
),
- 'first_name' => array('title' => ts('First Name'),
+ 'first_name' => array(
+ 'title' => ts('First Name'),
),
- 'last_name' => array('title' => ts('Last Name'),
+ 'last_name' => array(
+ 'title' => ts('Last Name'),
),
- 'job_title' =>
- array('title' => ts('Job Title'),
+ 'job_title' => array(
+ 'title' => ts('Job Title'),
'default' => TRUE,
),
- 'gender_id' =>
- array('title' => ts('Gender'),
+ 'gender_id' => array(
+ 'title' => ts('Gender'),
),
- 'id' =>
- array(
+ 'id' => array(
'no_display' => TRUE,
'required' => TRUE,
),
- 'contact_type' =>
- array(
+ 'contact_type' => array(
'title' => ts('Contact Type'),
),
- 'contact_sub_type' =>
- array(
+ 'contact_sub_type' => array(
'title' => ts('Contact Subtype'),
),
),
- 'filters' =>
- array(
- 'sort_name' =>
- array('title' => ts('Employee Name')),
- 'id' =>
- array('no_display' => TRUE),
+ 'filters' => array(
+ 'sort_name' => array('title' => ts('Employee Name')),
+ 'id' => array('no_display' => TRUE),
),
'grouping' => 'contact-fields',
),
- 'civicrm_relationship' =>
- array(
+ 'civicrm_relationship' => array(
'dao' => 'CRM_Contact_DAO_Relationship',
- 'fields' =>
- array(
- 'start_date' =>
- array('title' => ts('Employee Since'),
+ 'fields' => array(
+ 'start_date' => array(
+ 'title' => ts('Employee Since'),
'default' => TRUE,
),
),
- 'filters' =>
- array(
- 'start_date' =>
- array('title' => ts('Employee Since'),
+ 'filters' => array(
+ 'start_date' => array(
+ 'title' => ts('Employee Since'),
'operatorType' => CRM_Report_Form::OP_DATE,
'type' => CRM_Utils_Type::T_DATE,
),
),
),
- 'civicrm_phone' =>
- array(
+ 'civicrm_phone' => array(
'dao' => 'CRM_Core_DAO_Phone',
'grouping' => 'contact-fields',
- 'fields' =>
- array(
- 'phone' =>
- array('title' => ts('Phone'),
+ 'fields' => array(
+ 'phone' => array(
+ 'title' => ts('Phone'),
'default' => TRUE,
),
),
),
- 'civicrm_email' =>
- array(
+ 'civicrm_email' => array(
'dao' => 'CRM_Core_DAO_Email',
'grouping' => 'contact-fields',
- 'fields' =>
- array(
- 'email' =>
- array('title' => ts('Email'),
+ 'fields' => array(
+ 'email' => array(
+ 'title' => ts('Email'),
'default' => TRUE,
),
),
),
- 'civicrm_address' =>
- array(
+ 'civicrm_address' => array(
'dao' => 'CRM_Core_DAO_Address',
'grouping' => 'contact-fields',
- 'fields' =>
- array(
+ 'fields' => array(
'street_address' => NULL,
'city' => NULL,
'postal_code' => NULL,
- 'state_province_id' =>
- array('title' => ts('State/Province'),
+ 'state_province_id' => array(
+ 'title' => ts('State/Province'),
),
- 'country_id' =>
- array('title' => ts('Country'),
+ 'country_id' => array(
+ 'title' => ts('Country'),
),
),
- 'filters' =>
- array(
- 'country_id' =>
- array('title' => ts('Country'),
+ 'filters' => array(
+ 'country_id' => array(
+ 'title' => ts('Country'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::country(NULL, FALSE),
),
- 'state_province_id' =>
- array('title' => ts('State/Province'),
+ 'state_province_id' => array(
+ 'title' => ts('State/Province'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_PseudoConstant::stateProvince(),
),
),
),
- 'civicrm_group' =>
- array(
+ 'civicrm_group' => array(
'dao' => 'CRM_Contact_DAO_Group',
'alias' => 'cgroup',
- 'filters' =>
- array(
- 'gid' =>
- array(
+ 'filters' => array(
+ 'gid' => array(
'name' => 'group_id',
'title' => ts('Group'),
'group' => TRUE,
foreach ($this->_columns as $tableName => $table) {
if (array_key_exists('fields', $table)) {
foreach ($table['fields'] as $fieldName => $field) {
- if (!empty($field['required']) || !empty($this->_params['fields'][$fieldName])) {
+ if (!empty($field['required']) ||
+ !empty($this->_params['fields'][$fieldName])
+ ) {
$select[] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
$this->_columnHeaders["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array::value('type', $field);
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('operatorType', $field) & CRM_Report_Form::OP_DATE) {
+ if (CRM_Utils_Array::value('operatorType', $field) &
+ CRM_Report_Form::OP_DATE
+ ) {
$relative = CRM_Utils_Array::value("{$fieldName}_relative", $this->_params);
- $from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
- $to = CRM_Utils_Array::value("{$fieldName}_to", $this->_params);
+ $from = CRM_Utils_Array::value("{$fieldName}_from", $this->_params);
+ $to = CRM_Utils_Array::value("{$fieldName}_to", $this->_params);
$clause = $this->dateClause($field['name'], $relative, $from, $to, $field['type']);
}
$this->_where = "WHERE {$this->_aliases['civicrm_contact']}.employer_id!='null' ";
}
else {
- $this->_where = "WHERE ({$this->_aliases['civicrm_contact']}.employer_id!='null') AND " . implode(' AND ', $clauses);
+ $this->_where =
+ "WHERE ({$this->_aliases['civicrm_contact']}.employer_id!='null') AND " .
+ implode(' AND ', $clauses);
}
if ($this->_aclWhere) {
function postProcess() {
// get the acl clauses built before we assemble the query
- $this->buildACLClause(array($this->_aliases['civicrm_contact'], $this->_aliases['civicrm_employer']));
+ $this->buildACLClause(array(
+ $this->_aliases['civicrm_contact'],
+ $this->_aliases['civicrm_employer']
+ ));
parent::postProcess();
}