PHP Class Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product

Author: Aurelien FOUCRET ([email protected])
Inheritance: extends Magento\Rule\Model\Condition\Product\AbstractProduct
Show file Open project: smile-sa/elasticsuite Class Usage Examples

Public Methods

Method Description
__construct ( Magento\Rule\Model\Condition\Context $context, Magento\Backend\Helper\Data $backendData, Magento\Eav\Model\Config $config, AttributeList $attributeList, QueryBuilder $queryBuilder, Magento\Catalog\Model\ProductFactory $productFactory, Magento\Catalog\Api\ProductRepositoryInterface $productRepository, Magento\Catalog\Model\ResourceModel\Product $productResource, Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $attrSetCollection, Magento\Framework\Locale\FormatInterface $localeFormat, Magento\Config\Model\Config\Source\Yesno $booleanSource, array $data = [] ) Constructor.
getDefaultOperatorInputByType ( ) : array Default operator input by type map getter
getInputType ( ) {@inheritDoc}
getOperatorName ( ) {@inheritDoc}
getSearchQuery ( ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface Build a search query for the current rule.
getValue ( ) {@inheritDoc}
getValueElementType ( ) : string Retrieve value element type
getValueName ( ) {@inheritDoc}
loadAttributeOptions ( ) {@inheritDoc}
setElementName ( string $elementName ) Set the target element name (name of the input into the form).

Protected Methods

Method Description
_addSpecialAttributes ( array &$attributes )
_prepareValueOptions ( )

Method Details

__construct() public method

Constructor.
public __construct ( Magento\Rule\Model\Condition\Context $context, Magento\Backend\Helper\Data $backendData, Magento\Eav\Model\Config $config, AttributeList $attributeList, QueryBuilder $queryBuilder, Magento\Catalog\Model\ProductFactory $productFactory, Magento\Catalog\Api\ProductRepositoryInterface $productRepository, Magento\Catalog\Model\ResourceModel\Product $productResource, Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection $attrSetCollection, Magento\Framework\Locale\FormatInterface $localeFormat, Magento\Config\Model\Config\Source\Yesno $booleanSource, array $data = [] )
$context Magento\Rule\Model\Condition\Context Rule context.
$backendData Magento\Backend\Helper\Data Admin helper.
$config Magento\Eav\Model\Config EAV config.
$attributeList Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\AttributeList Product search rule attribute list.
$queryBuilder Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\QueryBuilder Product search rule query builder.
$productFactory Magento\Catalog\Model\ProductFactory Product factory.
$productRepository Magento\Catalog\Api\ProductRepositoryInterface Product repository.
$productResource Magento\Catalog\Model\ResourceModel\Product Product resource model.
$attrSetCollection Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection Attribute set collection.
$localeFormat Magento\Framework\Locale\FormatInterface Locale format.
$booleanSource Magento\Config\Model\Config\Source\Yesno Data source for boolean select.
$data array Additional data.

_addSpecialAttributes() protected method

protected _addSpecialAttributes ( array &$attributes )
$attributes array

_prepareValueOptions() protected method

protected _prepareValueOptions ( )

getDefaultOperatorInputByType() public method

Default operator input by type map getter

getInputType() public method

{@inheritDoc}
public getInputType ( )

getOperatorName() public method

{@inheritDoc}
public getOperatorName ( )

getSearchQuery() public method

Build a search query for the current rule.
public getSearchQuery ( ) : Smile\ElasticsuiteCore\Search\Request\QueryInterface
return Smile\ElasticsuiteCore\Search\Request\QueryInterface

getValue() public method

{@inheritDoc}
public getValue ( )

getValueElementType() public method

Retrieve value element type
public getValueElementType ( ) : string
return string

getValueName() public method

{@inheritDoc}
public getValueName ( )

loadAttributeOptions() public method

{@inheritDoc}

setElementName() public method

Set the target element name (name of the input into the form).
public setElementName ( string $elementName )
$elementName string Target element name