本文整理汇总了PHP中Mage_Catalog_Model_Layer_Filter_Abstract类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Catalog_Model_Layer_Filter_Abstract类的具体用法?PHP Mage_Catalog_Model_Layer_Filter_Abstract怎么用?PHP Mage_Catalog_Model_Layer_Filter_Abstract使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_Catalog_Model_Layer_Filter_Abstract类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getFilterName
/**
* Return unique filter name.
* OO purists would say that kind of ifs should be done using virtual functions. Here we ignore OO-ness and
* micro performance penalty for the sake of clarity and keeping logic in one file.
* @param Mage_Catalog_Model_Layer_Filter_Abstract $model
* @return string
*/
public function getFilterName($model)
{
if ($model instanceof Mana_Filters_Model_Filter_Category) {
return 'category';
} else {
return $model->getAttributeModel()->getAttributeCode();
}
}
开发者ID:rubenjohne,项目名称:ts-echo,代码行数:15,代码来源:Data.php
示例2: getFilterName
/**
* Return unique filter name.
* OO purists would say that kind of ifs should be done using virtual functions. Here we ignore OO-ness and
* micro performance penalty for the sake of clarity and keeping logic in one file.
* @param Mage_Catalog_Model_Layer_Filter_Abstract $model
* @return string
*/
public function getFilterName($block, $model)
{
if ($model instanceof Morphes_Filters_Model_Filter_Category) {
$result = 'category';
} else {
$result = $model->getAttributeModel()->getAttributeCode();
}
if ($showInFilter = $block->getShowInFilter()) {
return $showInFilter . '_' . $result;
} else {
return $result;
}
}
开发者ID:xiaoguizhidao,项目名称:ortodon,代码行数:20,代码来源:Data.php
示例3: isAttributeFilter
/**
* @param Mage_Catalog_Model_Layer_Filter_Abstract $filter
* @return bool
*/
public function isAttributeFilter(Mage_Catalog_Model_Layer_Filter_Abstract $filter)
{
return $filter instanceof Mage_Catalog_Model_Layer_Filter_Attribute && !$filter->getAttributeModel()->getSource() instanceof Mage_Eav_Model_Entity_Attribute_Source_Boolean;
}
开发者ID:technomagegithub,项目名称:magento,代码行数:8,代码来源:Data.php
示例4: apply
/**
* Apply decimal range filter to product collection
*
* @param Zend_Controller_Request_Abstract $request
* @param Mage_Catalog_Block_Layer_Filter_Decimal $filterBlock
* @return Mage_Catalog_Model_Layer_Filter_Decimal
*/
public function apply(Zend_Controller_Request_Abstract $request, $filterBlock)
{
parent::apply($request, $filterBlock);
/**
* Filter must be string: $index, $range
*/
$filter = $request->getParam($this->getRequestVar());
if (!$filter) {
return $this;
}
$filter = explode(',', $filter);
if (count($filter) != 2) {
return $this;
}
list($index, $range) = $filter;
if ((int) $index && (int) $range) {
$this->setRange((int) $range);
$this->_getResource()->applyFilterToCollection($this, $range, $index);
$this->getLayer()->getState()->addFilter($this->_createItem($this->_renderItemLabel($range, $index), $filter));
$this->_items = array();
}
return $this;
}
开发者ID:,项目名称:,代码行数:30,代码来源:
示例5: __construct
/**
* Construct attribute filter
*
*/
public function __construct()
{
parent::__construct();
$this->_requestVar = 'attribute';
}
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:9,代码来源:Layer_Filter_Attribute.php
示例6: getClearLinkText
/**
* Get 'clear price' link text
*
* @return false|string
*/
public function getClearLinkText()
{
if (Mage::app()->getStore()->getConfig(self::XML_PATH_RANGE_CALCULATION) == self::RANGE_CALCULATION_IMPROVED && $this->getPriorIntervals()) {
return Mage::helper('catalog')->__('Clear Price');
}
return parent::getClearLinkText();
}
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:12,代码来源:Price.php
示例7: _construct
public function _construct()
{
parent::_construct();
$this->_requestVar = 'discount';
}
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:5,代码来源:Discount.php
示例8: __construct
public function __construct()
{
parent::__construct();
$this->_requestVar = 'cat';
}
开发者ID:arslbbt,项目名称:mangentovies,代码行数:5,代码来源:Category.php
注:本文中的Mage_Catalog_Model_Layer_Filter_Abstract类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论