protected $_summary = NULL;
+ /**
+ * Organisation contact ie. 'contact_id_b' or 'contact_id_a'
+ * @var string
+ */
+ protected $orgContact;
+
+ /**
+ * Related Contact ie. 'contact_id_b' or 'contact_id_a'
+ * @var string
+ */
+ protected $otherContact;
+
/**
*
*/
'type' => CRM_Utils_Type::T_INT,
'operatorType' => CRM_Report_Form::OP_SELECT,
'options' => $this->relationTypes,
- 'default' => array(1),
+ 'default' => key($this->relationTypes),
),
),
'grouping' => 'organization-fields',
}
function postProcess() {
-
$this->beginPostProcess();
+ $this->buildACLClause(array($this->_aliases['civicrm_contact'], $this->_aliases['civicrm_contact_organization']));
+ $sql = $this->buildQuery(TRUE);
+ $rows = array();
+ $this->buildRows($sql, $rows);
+ $this->formatDisplay($rows);
+ $this->doTemplateAssignment($rows);
+ $this->endPostProcess($rows);
+ }
+
+ function beginPostProcessCommon() {
$getRelationship = $this->_params['relationship_type_id_value'];
$type = substr($getRelationship, -3);
$this->relationshipId = intval((substr($getRelationship, 0, strpos($getRelationship, '_'))));
$this->orgContact = 'contact_id_a';
$this->otherContact = 'contact_id_b';
}
-
- $this->buildACLClause(array($this->_aliases['civicrm_contact'], $this->_aliases['civicrm_contact_organization']));
- $sql = $this->buildQuery(TRUE);
- $rows = array();
-
- $this->buildRows($sql, $rows);
- $this->formatDisplay($rows);
- $this->doTemplateAssignment($rows);
- $this->endPostProcess($rows);
}
-
function validRelationships() {
$this->relationTypes = $relationTypes = array();