本文整理汇总了PHP中CCrmOwnerType::GetEditUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP CCrmOwnerType::GetEditUrl方法的具体用法?PHP CCrmOwnerType::GetEditUrl怎么用?PHP CCrmOwnerType::GetEditUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCrmOwnerType
的用法示例。
在下文中一共展示了CCrmOwnerType::GetEditUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute(array $contextData = null)
{
/** @var DealConverter $converter */
$converter = $this->converter;
if (is_array($contextData) && !empty($contextData)) {
$converter->setContextData(array_merge($converter->getContextData(), $contextData));
}
$result = false;
try {
$converter->initialize();
do {
$converter->executePhase();
} while ($converter->moveToNextPhase());
$resultData = $converter->getResultData();
if (isset($resultData[\CCrmOwnerType::InvoiceName])) {
$this->redirectUrl = \CCrmOwnerType::GetEditUrl(\CCrmOwnerType::Invoice, $resultData[\CCrmOwnerType::InvoiceName], false);
} elseif (isset($resultData[\CCrmOwnerType::QuoteName])) {
$this->redirectUrl = \CCrmOwnerType::GetEditUrl(\CCrmOwnerType::Quote, $resultData[\CCrmOwnerType::QuoteName], false);
}
$result = true;
} catch (EntityConversionException $e) {
$this->exception = $e;
if ($e->getTargetType() === EntityConversionException::TARG_DST) {
$this->redirectUrl = \CCrmOwnerType::GetEditUrl($e->getDestinationEntityTypeID(), 0, false) . '?conv_deal_id=' . $converter->getEntityID();
}
} catch (\Exception $e) {
$this->errorText = $e->getMessage();
}
$this->save();
return $result;
}
示例2: htmlspecialcharsbx
$settingButtonID = "{$prefix}_settings";
$disableDemoModeButtonID = "{$prefix}_disable_demo";
$demoModeInfoCloseButtonID = "{$prefix}_demo_info_close";
$demoModeInfoContainerID = "{$prefix}_demo_info";
if ($arResult['ENABLE_DEMO'] && $arResult['ENTITY_TYPE'] === CCrmOwnerType::DealName) {
?>
<div id="<?php
echo htmlspecialcharsbx($demoModeInfoContainerID);
?>
" class="crm-widg-white-tooltip">
<div class="crm-widg-white-text"><?php
echo GetMessage('CRM_WGT_DEAL_DEMO_TITLE');
?>
</div>
<div class="crm-widg-white-text"><?php
echo GetMessage('CRM_WGT_DEAL_DEMO_CONTENT', array('#URL#' => CCrmOwnerType::GetEditUrl(CCrmOwnerType::Deal, 0, false), '#CLASS_NAME#' => 'crm-widg-white-link'));
?>
</div>
<div class="crm-widg-white-text">
<div id="<?php
echo htmlspecialcharsbx($disableDemoModeButtonID);
?>
" class="crm-widg-white-bottom-link"><?php
echo GetMessage('CRM_WGT_DISABLE_DEMO');
?>
</div>
</div>
<div id="<?php
echo htmlspecialcharsbx($demoModeInfoCloseButtonID);
?>
" class="crm-widg-white-close"></div>
示例3: GetDataForPopup
public static function GetDataForPopup($callId, $phone, $userId = 0)
{
if (strlen($phone) <= 0 || !CModule::IncludeModule('crm')) {
return false;
}
if ($userId > 0) {
$findParams = array('USER_ID' => $userId);
} else {
$findParams = array('ENABLE_EXTENDED_MODE' => false);
}
$crm = CCrmSipHelper::findByPhoneNumber((string) $phone, $findParams);
if ($crm) {
$dealStatuses = CCrmViewHelper::GetDealStageInfos();
$entity = '';
$entityData = array();
$entities = array();
$arResult = array('FOUND' => 'Y', 'CONTACT' => array(), 'COMPANY' => array(), 'ACTIVITIES' => array(), 'DEALS' => array(), 'RESPONSIBILITY' => array());
if (isset($crm['CONTACT'])) {
$entity = 'CONTACT';
$entityData = $crm[$entity][0];
$arResult['CONTACT'] = array('NAME' => $entityData['FORMATTED_NAME'], 'POST' => $entityData['POST'], 'PHOTO' => '');
if (intval($entityData['PHOTO']) > 0) {
$arPhoto = CFile::ResizeImageGet($entityData['PHOTO'], array('width' => 37, 'height' => 37), BX_RESIZE_IMAGE_EXACT, false, false, true);
$arResult['CONTACT']['PHOTO'] = $arPhoto['src'];
}
$arResult['COMPANY'] = $entityData['COMPANY_TITLE'];
$arResult['CONTACT_DATA'] = array('ID' => $entityData['ID']);
} else {
if (isset($crm['LEAD'])) {
$entity = 'LEAD';
$entityData = $crm[$entity][0];
$arResult['CONTACT'] = array('ID' => 0, 'NAME' => !empty($entityData['FORMATTED_NAME']) ? $entityData['FORMATTED_NAME'] : $entityData['TITLE'], 'POST' => $entityData['POST'], 'PHOTO' => '');
$arResult['COMPANY'] = $entityData['COMPANY_TITLE'];
$arResult['LEAD_DATA'] = array('ID' => $entityData['ID'], 'ASSIGNED_BY_ID' => $entityData['ASSIGNED_BY_ID']);
} else {
if (isset($crm['COMPANY'])) {
$entity = 'COMPANY';
$entityData = $crm[$entity][0];
$arResult['COMPANY'] = $entityData['TITLE'];
$arResult['COMPANY_DATA'] = array('ID' => $entityData['ID']);
}
}
}
if ($entityData['ASSIGNED_BY_ID'] > 0) {
$ar = Bitrix\Main\UserTable::getById($entityData['ASSIGNED_BY_ID']);
if ($user = $ar->fetch()) {
$arPhoto = CFile::ResizeImageGet($user['PERSONAL_PHOTO'], array('width' => 37, 'height' => 37), BX_RESIZE_IMAGE_EXACT, false, false, true);
$arResult['RESPONSIBILITY'] = array('ID' => $user['ID'], 'NAME' => CUser::FormatName(CSite::GetNameFormat(false), $user, true, false), 'PHOTO' => $arPhoto ? $arPhoto['src'] : '', 'POST' => $user['WORK_POSITION']);
}
}
if (isset($entityData['SHOW_URL'])) {
$arResult['SHOW_URL'] = $entityData['SHOW_URL'];
}
if (isset($entityData['ACTIVITY_LIST_URL'])) {
$arResult['ACTIVITY_URL'] = $entityData['ACTIVITY_LIST_URL'];
}
if (isset($entityData['INVOICE_LIST_URL'])) {
$arResult['INVOICE_URL'] = $entityData['INVOICE_LIST_URL'];
}
if (isset($entityData['DEAL_LIST_URL'])) {
$arResult['DEAL_URL'] = $entityData['DEAL_LIST_URL'];
}
$activityId = CCrmActivity::GetIDByOrigin('VI_' . $callId);
if ($activityId) {
$arResult['CURRENT_CALL_URL'] = CCrmOwnerType::GetEditUrl(CCrmOwnerType::Activity, $activityId);
if ($arResult['CURRENT_CALL_URL'] !== '') {
$arResult['CURRENT_CALL_URL'] = CCrmUrlUtil::AddUrlParams($arResult['CURRENT_CALL_URL'], array("disable_storage_edit" => 'Y'));
}
}
if (isset($crm['CONTACT']) && isset($crm['COMPANY'])) {
$entities = array('CONTACT', 'COMPANY', 'LEAD');
} else {
if (isset($crm['CONTACT']) && isset($crm['LEAD']) && !isset($crm['COMPANY'])) {
$entities = array('CONTACT', 'LEAD');
} else {
if (isset($crm['LEAD']) && isset($crm['COMPANY']) && !isset($crm['CONTACT'])) {
$entities = array('LEAD', 'COMPANY');
} else {
$entities = array($entity);
}
}
}
foreach ($entities as $entity) {
if (isset($crm[$entity][0]['ACTIVITIES'])) {
foreach ($crm[$entity][0]['ACTIVITIES'] as $activity) {
if ($activity['ID'] == $activityId) {
continue;
}
$overdue = 'N';
if (strlen($activity['DEADLINE']) > 0 && MakeTimeStamp($activity['DEADLINE']) < time()) {
$overdue = 'Y';
}
$arResult['ACTIVITIES'][$activity['ID']] = array('TITLE' => $activity['SUBJECT'], 'DATE' => strlen($activity['DEADLINE']) > 0 ? $activity['DEADLINE'] : $activity['END_TIME'], 'OVERDUE' => $overdue, 'URL' => $activity['SHOW_URL']);
}
if (!empty($arResult['ACTIVITIES'])) {
$arResult['ACTIVITIES'] = array_values($arResult['ACTIVITIES']);
}
}
if (isset($crm[$entity][0]['DEALS'])) {
foreach ($crm[$entity][0]['DEALS'] as $deal) {
//.........这里部分代码省略.........