本文整理汇总了PHP中AssetModel::LoadAllIntoExtendedArray方法的典型用法代码示例。如果您正苦于以下问题:PHP AssetModel::LoadAllIntoExtendedArray方法的具体用法?PHP AssetModel::LoadAllIntoExtendedArray怎么用?PHP AssetModel::LoadAllIntoExtendedArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetModel
的用法示例。
在下文中一共展示了AssetModel::LoadAllIntoExtendedArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: btnNext_Click
//.........这里部分代码省略.........
foreach (Manufacturer::LoadAll() as $objManufacturer) {
$intManufacturerArray[$objManufacturer->ManufacturerId] = strtolower($objManufacturer->ShortDescription);
}
if (QApplication::$TracmorSettings->DepreciationFlag == '1') {
$intDepreciationClassArray = array();
foreach (DepreciationClass::LoadAll() as $objDepreciationClass) {
$intDepreciationClassArray[$objDepreciationClass->DepreciationClassId] = strtolower($objDepreciationClass->ShortDescription);
}
}
$intModelCustomFieldKeyArray = array();
$arrModelCustomField = array();
// Setup keys
foreach ($this->arrTracmorField as $key => $value) {
if ($value == 'short description') {
$intModelShortDescriptionKey = $key;
} elseif ($value == 'long description') {
$intModelLongDescriptionKey = $key;
} elseif ($value == 'model number') {
$intModelCodeKey = $key;
} elseif (substr($value, 0, 6) == 'model_') {
$intModelCustomFieldKeyArray[substr($value, 6)] = $key;
if (array_key_exists(substr($value, 6), $this->arrModelCustomField)) {
$arrModelCustomField[substr($value, 6)] = $this->arrModelCustomField[substr($value, 6)];
}
}
}
$strAssetModelArray = array();
$strItemCFVArray = array();
$strUpdatedItemCFVArray = array();
$strUpdatedValuesArray = array();
$this->arrOldItemArray = array();
$this->objUpdatedItemArray = array();
// Load all asset models
foreach (AssetModel::LoadAllIntoExtendedArray() as $arrAssetModel) {
$strAssetModelArray[] = strtolower(sprintf("%s_%s_%s_%s", addslashes($arrAssetModel['model_code']), addslashes($arrAssetModel['short_description']), $arrAssetModel['category_id'], $arrAssetModel['manufacturer_id']));
}
$this->btnNext->Warning = sprintf("Please wait... Model import complete: %s%s", ceil(($this->intCurrentFile + 1) * 200 / $this->intTotalCount * 100), "%");
}
// Asset
/*elseif ($this->intImportStep == 5) {
$intCategoryArray = array();
// Load all categories with keys=category_id
foreach (Category::LoadAllWithFlags(true, false) as $objCategory) {
//$intCategoryArray["'" . strtolower($objCategory->ShortDescription) . "'"] = $objCategory->CategoryId;
$intCategoryArray[$objCategory->CategoryId] = strtolower($objCategory->ShortDescription);
}
$intManufacturerArray = array();
// Load all manufacturers with keys=manufacturer_id
foreach (Manufacturer::LoadAll() as $objManufacturer) {
//$intManufacturerArray["'" . strtolower($objManufacturer->ShortDescription) . "'"] = $objManufacturer->ManufacturerId;
$intManufacturerArray[$objManufacturer->ManufacturerId] = strtolower($objManufacturer->ShortDescription);
}
if ($this->intCurrentFile == 0) {
$this->intAssetModelArray = array();
// Load all asset models with keys=asset_model_id
foreach (AssetModel::LoadAll() as $objAssetModel) {
//$intAssetModelArray["'" . strtolower($objAssetModel->ShortDescription) . "'"] = $objAssetModel->AssetModelId;
$this->intAssetModelArray[$objAssetModel->AssetModelId] = strtolower(sprintf("%s_%s_%s_%s", $objAssetModel->AssetModelCode, $objAssetModel->ShortDescription, $objAssetModel->CategoryId, $objAssetModel->ManufacturerId));
}
}
$intAssetCustomFieldKeyArray = array();
$arrAssetCustomField = array();
// Setup keys
foreach ($this->arrTracmorField as $key => $value) {
if ($value == 'asset model short description') {
$intModelShortDescriptionKey = $key;