本文整理匯總了PHP中Manufacturer::getAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP Manufacturer::getAll方法的具體用法?PHP Manufacturer::getAll怎麽用?PHP Manufacturer::getAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Manufacturer
的用法示例。
在下文中一共展示了Manufacturer::getAll方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _getEndJs
/**
* (non-PHPdoc)
* @see CRUDPageAbstract::_getEndJs()
*/
protected function _getEndJs()
{
$manufactureArray = $supplierArray = $statuses = $productCategoryArray = array();
foreach (Manufacturer::getAll() as $os) {
$manufactureArray[] = $os->getJson();
}
foreach (Supplier::getAll() as $os) {
$supplierArray[] = $os->getJson();
}
foreach (ProductStatus::getAll() as $os) {
$statuses[] = $os->getJson();
}
foreach (ProductCategory::getAll() as $os) {
$productCategoryArray[] = $os->getJson();
}
$js = parent::_getEndJs();
if (($product = Product::get($this->Request['id'])) instanceof Product) {
$js .= "\$('searchPanel').hide();";
$js .= "pageJs._singleProduct = true;";
}
$js .= 'pageJs._loadManufactures(' . json_encode($manufactureArray) . ')';
$js .= '._loadSuppliers(' . json_encode($supplierArray) . ')';
$js .= '._loadCategories(' . json_encode($productCategoryArray) . ')';
$js .= '._loadProductStatuses(' . json_encode($statuses) . ')';
$js .= "._loadChosen()";
$js .= "._bindSearchKey()";
$js .= ".setCallbackId('priceMatching', '" . $this->priceMatchingBtn->getUniqueID() . "')";
$js .= ".setCallbackId('toggleActive', '" . $this->toggleActiveBtn->getUniqueID() . "')";
$js .= ".getResults(true, " . $this->pageSize . ");";
return $js;
}
示例2: _getEndJs
/**
* (non-PHPdoc)
* @see CRUDPageAbstract::_getEndJs()
*/
protected function _getEndJs()
{
$manufactureArray = $supplierArray = $statuses = $productCategoryArray = array();
foreach (Manufacturer::getAll() as $os) {
$manufactureArray[] = $os->getJson();
}
foreach (Supplier::getAll() as $os) {
$supplierArray[] = $os->getJson();
}
foreach (ProductStatus::getAll() as $os) {
$statuses[] = $os->getJson();
}
foreach (ProductCategory::getAll() as $os) {
$productCategoryArray[] = $os->getJson();
}
$js = parent::_getEndJs();
if (($product = Product::get($this->Request['id'])) instanceof Product) {
$js .= "\$('searchPanel').hide();";
$js .= "pageJs._singleProduct = true;";
}
$js .= 'pageJs.totalValueId = "total-found-value";';
$js .= 'pageJs.totalQtyId = "total-found-qty";';
$js .= 'pageJs._loadManufactures(' . json_encode($manufactureArray) . ')';
$js .= '._loadSuppliers(' . json_encode($supplierArray) . ')';
$js .= '._loadCategories(' . json_encode($productCategoryArray) . ')';
$js .= '._loadProductStatuses(' . json_encode($statuses) . ')';
$js .= "._loadChosen()";
$js .= "._bindSearchKey()";
$js .= "._bindNewRuleBtn()";
$js .= ".setCallbackId('priceMatching', '" . $this->priceMatchingBtn->getUniqueID() . "')";
$js .= ".setCallbackId('toggleActive', '" . $this->toggleActiveBtn->getUniqueID() . "')";
$js .= ".setCallbackId('toggleSellOnWeb', '" . $this->toggleSellOnWebBtn->getUniqueID() . "')";
$js .= ".setCallbackId('updatePrice', '" . $this->updatePriceBtn->getUniqueID() . "')";
$js .= ".setCallbackId('updateStockLevel', '" . $this->updateStockLevelBtn->getUniqueID() . "')";
$js .= ".setCallbackId('toggleIsKit', '" . $this->toggleIsKitBtn->getUniqueID() . "')";
$js .= ".setCallbackId('toggleManualFeed', '" . $this->toggleManualFeedBtn->getUniqueID() . "')";
$js .= ".setCallbackId('newRule', '" . $this->newRuleBtn->getUniqueID() . "')";
$js .= ".getResults(true, " . $this->pageSize . ");";
return $js;
}
示例3: _getEndJs
/**
* Getting The end javascript
*
* @return string
*/
protected function _getEndJs()
{
$btnIdnewPO = isset($_REQUEST['btnidnewpo']) && trim($_REQUEST['btnidnewpo']) !== '' ? trim($_REQUEST['btnidnewpo']) : null;
$manufacturers = array_map(create_function('$a', 'return $a->getJson();'), Manufacturer::getAll());
$suppliers = array_map(create_function('$a', 'return $a->getJson();'), Supplier::getAll());
$statuses = array_map(create_function('$a', 'return $a->getJson();'), ProductStatus::getAll());
$priceTypes = array_map(create_function('$a', 'return $a->getJson();'), ProductPriceType::getAll());
$codeTypes = array_map(create_function('$a', 'return $a->getJson();'), ProductCodeType::getAll());
$locationTypes = array_map(create_function('$a', 'return $a->getJson();'), PreferredLocationType::getAll());
$accountingCodes = array_map(create_function('$a', 'return array("id"=> $a->getId(), "code"=> $a->getCode(), "description"=> $a->getDescription(), "type"=> $a->getTypeId());'), AccountingCode::getAll());
$js = parent::_getEndJs();
$js .= "pageJs.setPreData(" . json_encode($manufacturers) . ", " . json_encode($suppliers) . ", " . json_encode($statuses) . ", " . json_encode($priceTypes) . ", " . json_encode($codeTypes) . ", " . json_encode($locationTypes) . ", " . json_encode($btnIdnewPO) . ", " . json_encode($accountingCodes) . ")";
$js .= ".setCallbackId('getCategories', '" . $this->getCategoriesBtn->getUniqueID() . "')";
$js .= ".setCallbackId('validateSKU', '" . $this->validateSKUBtn->getUniqueID() . "')";
$js .= ".load()";
$js .= ".bindAllEventNObjects()";
$js .= "._loadChosen();";
if (!AccessControl::canEditProduct(Core::getRole())) {
$js .= "pageJs.readOnlyMode();";
}
return $js;
}