本文整理汇总了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') {
}