本文整理汇总了PHP中CRM_Core_BAO_UFGroup::showOverlayProfile方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_UFGroup::showOverlayProfile方法的具体用法?PHP CRM_Core_BAO_UFGroup::showOverlayProfile怎么用?PHP CRM_Core_BAO_UFGroup::showOverlayProfile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_BAO_UFGroup
的用法示例。
在下文中一共展示了CRM_Core_BAO_UFGroup::showOverlayProfile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
//.........这里部分代码省略.........
if ($id == 'Primary') {
$locationTypeName = 1;
}
}
if (!$locationTypeName) {
continue;
}
$locationTypeName = str_replace(' ', '_', $locationTypeName);
if (in_array($fieldName, array('phone', 'im', 'email'))) {
if ($type) {
$names[] = "{$locationTypeName}-{$fieldName}-{$type}";
} else {
$names[] = "{$locationTypeName}-{$fieldName}";
}
} else {
$names[] = "{$locationTypeName}-{$fieldName}";
}
} else {
$names[] = "website-{$id}-{$fieldName}";
}
} elseif ($field['name'] == 'id') {
$names[] = 'contact_id';
} else {
$names[] = $field['name'];
}
}
}
$multipleSelectFields = array('preferred_communication_method' => 1);
$multiRecordTableId = NULL;
if ($this->_multiRecordTableName) {
$multiRecordTableId = "{$this->_multiRecordTableName}_id";
}
// we need to determine of overlay profile should be shown
$showProfileOverlay = CRM_Core_BAO_UFGroup::showOverlayProfile();
while ($result->fetch()) {
$this->_query->convertToPseudoNames($result);
if (isset($result->country)) {
// the query returns the untranslated country name
$i18n = CRM_Core_I18n::singleton();
$result->country = $i18n->translate($result->country);
}
$row = array();
$empty = TRUE;
$row[] = CRM_Contact_BAO_Contact_Utils::getImage($result->contact_sub_type ? $result->contact_sub_type : $result->contact_type, FALSE, $result->contact_id, $showProfileOverlay);
if ($result->sort_name) {
$row[] = $result->sort_name;
$empty = FALSE;
} else {
continue;
}
foreach ($names as $name) {
if ($cfID = CRM_Core_BAO_CustomField::getKeyID($name)) {
$row[] = CRM_Core_BAO_CustomField::getDisplayValue($result->{$name}, $cfID, $this->_options, $result->contact_id);
} elseif (substr($name, -4) == '-url' && !empty($result->{$name})) {
$url = CRM_Utils_System::fixURL($result->{$name});
$typeId = substr($name, 0, -4) . "-website_type_id";
$typeName = CRM_Core_PseudoConstant::getLabel('CRM_Core_DAO_Website', 'website_type_id', $result->{$typeId});
if ($typeName) {
$row[] = "<a href=\"{$url}\">{$result->{$name}} ({$typeName})</a>";
} else {
$row[] = "<a href=\"{$url}\">{$result->{$name}}</a>";
}
} elseif ($name == 'preferred_language') {
$row[] = CRM_Core_PseudoConstant::getLabel('CRM_Contact_DAO_Contact', 'preferred_language', $result->{$name});
} elseif ($multipleSelectFields && array_key_exists($name, $multipleSelectFields)) {
$paramsNew = array($name => $result->{$name});