當前位置: 首頁>>代碼示例>>PHP>>正文


PHP type::getSelect方法代碼示例

本文整理匯總了PHP中type::getSelect方法的典型用法代碼示例。如果您正苦於以下問題:PHP type::getSelect方法的具體用法?PHP type::getSelect怎麽用?PHP type::getSelect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在type的用法示例。


在下文中一共展示了type::getSelect方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: filterToptierAffiliateAccount

 /**
  * 
  * @param type $collection
  * @param type $column
  * @return type
  */
 public function filterToptierAffiliateAccount(&$collection, $column)
 {
     $accountTable = Mage::getModel('core/resource')->getTableName('affiliateplus_account');
     $value = $column->getFilter()->getValue();
     if (!isset($value)) {
         return;
     }
     if ($value == 'N/A') {
         $collection->getSelect()->where("{$accountTable}.name IS NULL");
         return;
     }
     $collection->getSelect()->where("{$accountTable}.name = '{$value}'");
 }
開發者ID:billadams,項目名稱:forever-frame,代碼行數:19,代碼來源:Observer.php

示例2: filterCallback

 /**
  * Callback filter for Warehouse
  * 
  * @param type $collection
  * @param type $column
  * @return type
  */
 public function filterCallback($collection, $column)
 {
     $value = $column->getFilter()->getValue();
     if (!is_null(@$value)) {
         $collection->getSelect()->where('inventory_shipment.warehouse_id = ?', $value);
     }
     return $this;
 }
開發者ID:cabrerabywaters,項目名稱:magentoSunshine,代碼行數:15,代碼來源:Grid.php

示例3: getCustomerChartPieData

 /**
  * Get chart pie data for customer report
  * 
  * @param type $collection
  * @param type $requestData
  * @return string
  */
 public function getCustomerChartPieData($collection, $requestData)
 {
     $collection->getSelect()->order('IFNULL(SUM(main_table.grand_total),0) DESC')->limit(20);
     $reportcode = $requestData['report_radio_select'];
     $i = 0;
     $series = '';
     foreach ($collection as $col) {
         if ($i != 0) {
             $series .= ',';
         }
         $series .= '{name:\'' . $col->getData('customer_firstname') . " " . $col->getData('customer_lastname') . ' (' . $col->getData('telephone') . ')' . '\',y:' . abs($col->getData('sum_grand_total')) . '}';
         $i++;
     }
     $data['series'] = $series;
     return $data;
 }
開發者ID:cabrerabywaters,項目名稱:magentoSunshine,代碼行數:23,代碼來源:Data.php

示例4: _filterNumberCallback

 /**
  * Filter number field
  * 
  * @param type $collection
  * @param type $column
  * @return collection
  */
 protected function _filterNumberCallback($collection, $column)
 {
     $filter = $column->getFilter()->getValue();
     $field = $this->_getRealFieldFromAlias($column->getIndex());
     if (isset($filter['from']) && $filter['from'] != '') {
         $collection->getSelect()->having($field . ' >= ' . $filter['from']);
     }
     if (isset($filter['to']) && $filter['to'] != '') {
         $collection->getSelect()->having($field . ' <= ' . $filter['to']);
     }
     $collection->setIsGroupCountSql(true);
     $collection->setResetHaving(true);
     return $collection;
 }
開發者ID:javik223,項目名稱:Evron-Magento,代碼行數:21,代碼來源:Grid.php

示例5: _filterNumberCallback

 /**
  * Filter number field
  * 
  * @param type $collection
  * @param type $column
  * @return collection
  */
 protected function _filterNumberCallback($collection, $column)
 {
     $filter = $column->getFilter()->getValue();
     $field = $this->_getRealFieldFromAlias($column->getIndex());
     if (isset($filter['from'])) {
         $collection->getSelect()->having($field . ' >= \'' . $filter['from'] . '\'');
     }
     if (isset($filter['to'])) {
         $collection->getSelect()->having($field . ' <= \'' . $filter['to'] . '\'');
     }
     return $collection;
 }
開發者ID:javik223,項目名稱:Evron-Magento,代碼行數:19,代碼來源:Grid.php

示例6: _filterDateCallback

 /**
  * Filter datetime field
  * 
  * @param type $collection
  * @param type $column
  * @return type
  */
 protected function _filterDateCallback($collection, $column)
 {
     $filter = $column->getFilter()->getValue();
     $field = $this->_getRealFieldFromAlias($column->getIndex());
     if (isset($filter['orig_from'])) {
         $from = date('Y-m-d H:i:s', strtotime($filter['orig_from']));
         $collection->getSelect()->having($field . ' >= \'' . $from . '\'');
     }
     if (isset($filter['orig_to'])) {
         $to = date('Y-m-d H:i:s', strtotime($filter['orig_to']));
         $collection->getSelect()->having($field . ' <= \'' . $to . '\'');
     }
     return $collection;
 }
開發者ID:cabrerabywaters,項目名稱:magentoSunshine,代碼行數:21,代碼來源:Abstractgrid.php


注:本文中的type::getSelect方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。