/** * Call preprocess. */ public function preProcess() { parent::preProcess(); $this->_locBlockNo = CRM_Utils_Request::retrieve('locno', 'Positive', $this, TRUE, NULL, $_REQUEST); $this->assign('blockId', $this->_locBlockNo); $addressSequence = CRM_Core_BAO_Address::addressSequence(); $this->assign('addressSequence', $addressSequence); $this->_values = array(); $this->_addressId = CRM_Utils_Request::retrieve('aid', 'Positive', $this, FALSE, NULL, $_REQUEST); $this->_action = CRM_Core_Action::ADD; if ($this->_addressId) { $params = array('id' => $this->_addressId); $address = CRM_Core_BAO_Address::getValues($params, FALSE, 'id'); $this->_values['address'][$this->_locBlockNo] = array_pop($address); $this->_action = CRM_Core_Action::UPDATE; } else { $this->_addressId = 0; } $this->assign('action', $this->_action); $this->assign('addressId', $this->_addressId); // parse street address, CRM-5450 $this->_parseStreetAddress = $this->get('parseStreetAddress'); if (!isset($this->_parseStreetAddress)) { $addressOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_options'); $this->_parseStreetAddress = FALSE; if (!empty($addressOptions['street_address']) && !empty($addressOptions['street_address_parsing'])) { $this->_parseStreetAddress = TRUE; } $this->set('parseStreetAddress', $this->_parseStreetAddress); } $this->assign('parseStreetAddress', $this->_parseStreetAddress); }
/** * Call preprocess. */ public function preProcess() { parent::preProcess(); //get all the existing openids $openid = new CRM_Core_BAO_OpenID(); $openid->contact_id = $this->_contactId; $this->_openids = CRM_Core_BAO_Block::retrieveBlock($openid, NULL); }
/** * call preprocess */ public function preProcess() { parent::preProcess(); //get all the existing ims $im = new CRM_Core_BAO_IM(); $im->contact_id = $this->_contactId; $this->_ims = CRM_Core_BAO_Block::retrieveBlock($im, NULL); }
/** * call preprocess */ public function preProcess() { parent::preProcess(); //get all the existing phones $phone = new CRM_Core_BAO_Phone(); $phone->contact_id = $this->_contactId; $this->_phones = CRM_Core_BAO_Block::retrieveBlock($phone, NULL); }
/** * call preprocess */ public function preProcess() { parent::preProcess(); //get all the existing websites $params = array('contact_id' => $this->_contactId); $values = array(); $this->_websites = CRM_Core_BAO_Website::getValues($params, $values); }
/** * call preprocess */ public function preProcess() { parent::preProcess(); //get all the existing email addresses $email = new CRM_Core_BAO_Email(); $email->contact_id = $this->_contactId; $this->_emails = CRM_Core_BAO_Block::retrieveBlock($email, NULL); }
/** * Call preprocess. */ public function preProcess() { parent::preProcess(); $this->_groupID = CRM_Utils_Request::retrieve('groupID', 'Positive', $this, TRUE, NULL, $_REQUEST); $this->assign('customGroupId', $this->_groupID); $customRecId = CRM_Utils_Request::retrieve('customRecId', 'Positive', $this, FALSE, 1, $_REQUEST); $cgcount = CRM_Utils_Request::retrieve('cgcount', 'Positive', $this, FALSE, 1, $_REQUEST); $subType = CRM_Contact_BAO_Contact::getContactSubType($this->_contactId, ','); CRM_Custom_Form_CustomData::preProcess($this, NULL, $subType, $cgcount, $this->_contactType, $this->_contactId); }
/** * Call preprocess. */ public function preProcess() { parent::preProcess(); //get all the existing email addresses $email = new CRM_Core_BAO_Email(); $email->contact_id = $this->_contactId; $this->_emails = CRM_Core_BAO_Block::retrieveBlock($email, NULL); // Check if this contact has a first/last/organization/household name if ($this->_contactType == 'Individual') { $this->contactHasName = (bool) (CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_contactId, 'last_name') || CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_contactId, 'first_name')); } else { $this->contactHasName = (bool) CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_contactId, strtolower($this->_contactType) . '_name'); } }