* False, if we want to skip the address sharing features.
* @param bool $inlineEdit
* True when edit used in inline edit.
+ *
+ * @throws \CiviCRM_API3_Exception
*/
public static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharing = TRUE, $inlineEdit = FALSE) {
// passing this via the session is AWFUL. we need to fix this
continue;
}
}
- if ($name == 'address_name') {
+ if ($name === 'address_name') {
$name = 'name';
}
$params = ['entity' => 'address'];
- if ($name == 'postal_code_suffix') {
+ if ($name === 'postal_code_suffix') {
$params['label'] = ts('Suffix');
}
$requireOmission = NULL;
foreach ($groupTree as $csId => $csVal) {
// only process Address entity fields
- if ($csVal['extends'] != 'Address') {
+ if ($csVal['extends'] !== 'Address') {
continue;
}
* @param CRM_Core_Form $form
* @param int $entityId
* @param int $blockId
+ *
+ * @throws \CRM_Core_Exception
+ * @throws \CiviCRM_API3_Exception
*/
protected static function addCustomDataToForm(&$form, $entityId, $blockId) {
$groupTree = CRM_Core_BAO_CustomGroup::getTree('Address', NULL, $entityId);
continue;
}
- // inorder to set correct defaults for checkbox custom data, we need to converted flat key to array
+ // in order to set correct defaults for checkbox custom data, we need to converted flat key to array
// this works for all types custom data
$keyValues = explode('[', str_replace(']', '', $key));
$addressDefaults[$keyValues[0]][$keyValues[1]][$keyValues[2]] = $val;