本文整理汇总了PHP中CCrmStatus::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP CCrmStatus::GetList方法的具体用法?PHP CCrmStatus::GetList怎么用?PHP CCrmStatus::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCrmStatus
的用法示例。
在下文中一共展示了CCrmStatus::GetList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
$arUpdate['NAME'] = trim($arField['VALUE']);
$arUpdate['SORT'] = $arField['SORT'];
$CCrmStatus->Update($id, $arUpdate);
}
}
}
}
}
$arResult['ACTIVE_TAB'] = $_POST['ACTIVE_TAB'];
}
$ar = CCrmStatus::GetEntityTypes();
foreach ($ar as $entityId => $arEntityType) {
$arResult['HEADERS'][$entityId] = $arEntityType['NAME'];
$arResult['ROWS'][$entityId] = array();
}
$res = CCrmStatus::GetList(array('SORT' => 'ASC'));
while ($ar = $res->Fetch()) {
$arResult['ROWS'][$ar['ENTITY_ID']][$ar['ID']] = $ar;
}
/*
* We can add here some elements to status list of own type(s)
* TODO: transfer to GetList
*/
$events = GetModuleEvents("crm", "OnCrmStatusGetList");
while ($arEvent = $events->Fetch()) {
$arStatuses = ExecuteModuleEventEx($arEvent);
foreach ($arStatuses as $key => $arStatus) {
$arResult['ROWS'][$arStatus['ENTITY_ID']][$arStatus['ID']] = $arStatus;
}
}
/**/
示例2: getEntityItems
public function getEntityItems($entityID)
{
if (!CCrmStatus::CheckReadPermission(0)) {
throw new RestException('Access denied.');
}
if ($entityID === '') {
throw new RestException('The parameter entityId is not defined or invalid.');
}
//return CCrmStatus::GetStatusList($entityID);
$dbResult = CCrmStatus::GetList(array('sort' => 'asc'), array('ENTITY_ID' => strtoupper($entityID)));
if (!$dbResult) {
return array();
}
$result = array();
while ($fields = $dbResult->Fetch()) {
$result[] = array('NAME' => $fields['NAME'], 'SORT' => intval($fields['SORT']), 'STATUS_ID' => $fields['STATUS_ID']);
}
return $result;
}