本文整理匯總了PHP中Bitrix\Sale\Location\LocationTable::getByID方法的典型用法代碼示例。如果您正苦於以下問題:PHP LocationTable::getByID方法的具體用法?PHP LocationTable::getByID怎麽用?PHP LocationTable::getByID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Bitrix\Sale\Location\LocationTable
的用法示例。
在下文中一共展示了LocationTable::getByID方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$arResult['BUTTONS'][] = array('TEXT' => GetMessage('CRM_LOC_ADD'), 'TITLE' => GetMessage('CRM_LOC_ADD_TITLE'), 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_LOCATIONS_ADD'], array()) . ($filterParentId ? '?PARENT_ID=' . $filterParentId : ''), 'ICON' => 'btn-new');
}
// IMPORT IN LIST
if ($locImport) {
if (CSaleLocation::isLocationProEnabled()) {
$link = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_LOCATIONS_IMPORT'], array());
} else {
$link = "javascript:(new BX.CDialog({\n\t\t\t\t\t\t\t\t'content_url':'/bitrix/components/bitrix/crm.config.locations.import/box.php',\n\t\t\t\t\t\t\t\t'width':'540',\n\t\t\t\t\t\t\t\t'height':'275',\n\t\t\t\t\t\t\t\t'resizable':false })).Show();";
}
$arResult['BUTTONS'][] = array('TEXT' => GetMessage('CRM_LOCATIONS_IMPORT'), 'TITLE' => GetMessage('CRM_LOCATIONS_IMPORT_TITLE'), 'LINK' => $link, 'ICON' => 'btn-new');
}
} elseif ($arParams['TYPE'] == 'edit') {
$parentId = false;
if (CSaleLocation::isLocationProEnabled()) {
if ($locID) {
$res = Location\LocationTable::getByID($locID)->fetch();
if (!!$res['ID']) {
$parentId = $res['PARENT_ID'];
}
} elseif (isset($_REQUEST['PARENT_ID'])) {
$parentId = intval($_REQUEST['PARENT_ID']);
}
}
// GO TO PARENT LIST IN EDIT
$arResult['BUTTONS'][] = array('TEXT' => GetMessage('CRM_LOC_LIST'), 'TITLE' => GetMessage('CRM_LOC_LIST_TITLE'), 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_LOCATIONS_LIST'], array()), 'ICON' => 'btn-list');
// ADD IN EDIT
if ($locAdd) {
$arResult['BUTTONS'][] = array('TEXT' => GetMessage('CRM_LOC_ADD'), 'TITLE' => GetMessage('CRM_LOC_ADD_TITLE'), 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_LOCATIONS_ADD'], array()) . ($parentId !== false ? '?PARENT_ID=' . $parentId : ''), 'ICON' => 'btn-new');
}
} elseif ($arParams['TYPE'] == 'show') {
}