PHP Class Smile\ElasticsuiteCatalog\Block\Navigation\Renderer\Slider

Author: Aurelien FOUCRET ([email protected])
Author: Romain Ruaud ([email protected])
Inheritance: extends AbstractRenderer
Show file Open project: smile-sa/elasticsuite Class Usage Examples

Protected Properties

Property Type Description
$dataRole string The Data role, used for Javascript mapping of slider Widget
$localeFormat Magento\Framework\Locale\FormatInterface

Public Methods

Method Description
__construct ( Magento\Framework\View\Element\Template\Context $context, Magento\Framework\Json\EncoderInterface $jsonEncoder, Magento\Framework\Locale\FormatInterface $localeFormat, array $data = [] )
getDataRole ( ) : string Retrieve the data role
getJsonConfig ( ) : string Return the config of the price slider JS widget.

Protected Methods

Method Description
canRenderFilter ( ) {@inheritDoc}
getConfig ( ) : array Retrieve configuration
getFieldFormat ( ) : array Retrieve Field Format for slider display
getMaxValue ( ) : integer Returns max value of the slider.
getMinValue ( ) : integer Returns min value of the slider.

Private Methods

Method Description
getCurrentValue ( ) : array Returns values currently selected by the user.
getIntervals ( ) : array Return available intervals.
getUrlTemplate ( ) : string Retrieve filter URL template with placeholders for range.

Method Details

__construct() public method

public __construct ( Magento\Framework\View\Element\Template\Context $context, Magento\Framework\Json\EncoderInterface $jsonEncoder, Magento\Framework\Locale\FormatInterface $localeFormat, array $data = [] )
$context Magento\Framework\View\Element\Template\Context Template context.
$jsonEncoder Magento\Framework\Json\EncoderInterface JSON Encoder.
$localeFormat Magento\Framework\Locale\FormatInterface Price format config.
$data array Custom data.

canRenderFilter() protected method

{@inheritDoc}
protected canRenderFilter ( )

getConfig() protected method

Retrieve configuration
protected getConfig ( ) : array
return array

getDataRole() public method

Retrieve the data role
public getDataRole ( ) : string
return string

getFieldFormat() protected method

Retrieve Field Format for slider display
protected getFieldFormat ( ) : array
return array

getJsonConfig() public method

Return the config of the price slider JS widget.
public getJsonConfig ( ) : string
return string

getMaxValue() protected method

Returns max value of the slider.
protected getMaxValue ( ) : integer
return integer

getMinValue() protected method

Returns min value of the slider.
protected getMinValue ( ) : integer
return integer

Property Details

$dataRole protected property

The Data role, used for Javascript mapping of slider Widget
protected string $dataRole
return string

$localeFormat protected property

protected FormatInterface,Magento\Framework\Locale $localeFormat
return Magento\Framework\Locale\FormatInterface