当前位置: 首页>>代码示例>>PHP>>正文


PHP Supplier::getAll方法代码示例

本文整理汇总了PHP中Supplier::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Supplier::getAll方法的具体用法?PHP Supplier::getAll怎么用?PHP Supplier::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Supplier的用法示例。


在下文中一共展示了Supplier::getAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:35,代码来源:ProductController.php

示例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;
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:44,代码来源:ProductController.php

示例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;
 }
开发者ID:larryu,项目名称:magento-b2b,代码行数:27,代码来源:DetailsController.php

示例4: header

    header("Location: /suppliers/?id=notFound");
    exit;
}
if (isset($_GET['go']) && $_GET['go'] == "y") {
    $supplierDelete = new Supplier();
    $supplierDelete->setSuppid($_GET['id']);
    $supplierDelete->deleteFromDB();
    header("Location: /supplier/?ItemDeleted=y");
    exit;
}
include "../tmpl/header.php";
$supplier = new Supplier();
// Load DB data into object
$supplier->setSuppid($_GET['id']);
$supplier->loadSupplier();
$all = $supplier->getAll();
if (isset($all)) {
    ?>
		   
<div class="panel panel-info">
	<div class="panel-heading">
		<strong>Viewing <?php 
    echo $supplier->getSuppid();
    ?>
</strong>
	</div>
	<div class="panel-body">
		<?php 
    foreach ($all as $key => $value) {
        if (isset($value) && $value != '') {
            ?>
开发者ID:athenasystems,项目名称:athena,代码行数:31,代码来源:delete.php


注:本文中的Supplier::getAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。