本文整理汇总了PHP中Manufacturer::LoadAllWithCustomFieldsHelper方法的典型用法代码示例。如果您正苦于以下问题:PHP Manufacturer::LoadAllWithCustomFieldsHelper方法的具体用法?PHP Manufacturer::LoadAllWithCustomFieldsHelper怎么用?PHP Manufacturer::LoadAllWithCustomFieldsHelper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Manufacturer
的用法示例。
在下文中一共展示了Manufacturer::LoadAllWithCustomFieldsHelper方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: btnNext_Click
//.........这里部分代码省略.........
$strManufacturerArray[] = $txtDefaultValue;
$objNewManufacturer = new Manufacturer();
$objNewManufacturer->ShortDescription = addslashes($txtDefaultValue);
$objNewManufacturer->Save();
$this->objNewManufacturerArray[$objNewManufacturer->ManufacturerId] = $objNewManufacturer->ShortDescription;
}
$this->btnNext->Warning = "Manufacturers have been imported. Please wait...";
}
for ($j = $this->intCurrentFile; $j < count($this->strFilePathArray); $j++) {
$this->FileCsvData->load($this->strFilePathArray[$j]);
if (!$j) {
//$this->FileCsvData->appendRow($this->FileCsvData->getHeaders());
}
// Manufacturer Import
if ($this->intImportStep == 2) {
$arrItemCustomField = array();
foreach ($this->arrTracmorField as $key => $value) {
if (substr($value, 0, 13) == 'manufacturer_') {
$intItemCustomFieldKeyArray[substr($value, 13)] = $key;
if (array_key_exists(substr($value, 13), $this->arrItemCustomField)) {
$arrItemCustomField[substr($value, 13)] = $this->arrItemCustomField[substr($value, 13)];
}
}
}
$strManufacturerValuesArray = array();
$strUpdatedManufacturerValuesArray = array();
$strItemCFVArray = array();
$strUpdatedItemCFVArray = array();
$strNewManufacturerArray = array();
$intManufacturerArray = array();
$this->arrOldItemArray = array();
$this->objUpdatedItemArray = array();
$objManufacturerArray = array();
foreach (Manufacturer::LoadAllWithCustomFieldsHelper() as $objManufacturer) {
$objManufacturerArray[strtolower($objManufacturer->ShortDescription)] = $objManufacturer;
}
for ($i = 0; $i < $this->FileCsvData->countRows(); $i++) {
$strRowArray = $this->FileCsvData->getRow($i);
$objManufacturer = null;
if ($this->lstImportAction->SelectedValue == 2) {
$intItemId = intval(trim($strRowArray[$this->intItemIdKey]));
foreach ($objManufacturerArray as $objItem) {
if ($objItem->ManufacturerId == $intItemId) {
$objManufacturer = $objItem;
break;
}
}
} else {
$intItemId = 0;
}
// Create action
if (trim($strRowArray[$this->intManufacturerKey]) && (!$intItemId || !$objManufacturer) && !$this->in_array_nocase(trim($strRowArray[$this->intManufacturerKey]), $strManufacturerArray)) {
$strManufacturerArray[] = trim($strRowArray[$this->intManufacturerKey]);
$strManufacturerDescription = "";
if (isset($this->intManufacturerDescriptionKey)) {
if (trim($strRowArray[$this->intManufacturerDescriptionKey])) {
$strManufacturerDescription = trim($strRowArray[$this->intManufacturerDescriptionKey]);
} else {
$strManufacturerDescription = isset($this->txtMapDefaultValueArray[$this->intManufacturerDescriptionKey]) ? trim($this->txtMapDefaultValueArray[$this->intManufacturerDescriptionKey]->Text) : '';
}
}
$strCFVArray = array();
$blnCheckCFVError = false;
// Custom Field import
foreach ($arrItemCustomField as $objCustomField) {
if ($objCustomField->CustomFieldQtypeId != 2) {
示例2: dtgManufacturer_Bind
protected function dtgManufacturer_Bind()
{
$objExpansionMap[Manufacturer::ExpandCreatedByObject] = true;
// Get Total Count b/c of Pagination
$this->dtgManufacturer->TotalItemCount = Manufacturer::CountAll();
if ($this->dtgManufacturer->TotalItemCount == 0) {
$this->dtgManufacturer->ShowHeader = false;
} else {
/* $objClauses = array();
if ($objClause = $this->dtgManufacturer->OrderByClause)
array_push($objClauses, $objClause);
if ($objClause = $this->dtgManufacturer->LimitClause)
array_push($objClauses, $objClause);
if ($objClause = QQ::Expand(QQN::Manufacturer()->CreatedByObject))
array_push($objClauses, $objClause);
$this->dtgManufacturer->DataSource = Manufacturer::LoadAll($objClauses);
$this->dtgManufacturer->ShowHeader = true;*/
$this->dtgManufacturer->DataSource = Manufacturer::LoadAllWithCustomFieldsHelper($this->dtgManufacturer->SortInfo, $this->dtgManufacturer->LimitInfo, $objExpansionMap);
$this->dtgManufacturer->ShowHeader = true;
}
}