I am working with module need customization with category layernavigation I found class Magento\Catalog\Model\ResourceModel\Layer\Filter\Price has been used in several places. I think it must be very important. When I look I see more details:

 * @var \Magento\Catalog\Model\Layer
private $layer;

I wonder why $layer property is private? If anyone can short explain what layer is that would be great.

Second I found the function:

 * Retrieve clean select with joined price index table
 * @return \Magento\Framework\DB\Select
protected function _getSelect()
 //Alot codes here

Is there a way to place plugin on above function, I want to add my code to filter follow my custom attributes and join query to another table ? It is a right place or i visit wrong place.

I don't want use preference in this case if no anymore choice. Override core function maybe very risky in future


You cannot add plugins for protected methods. Maybe you can find a public method that uses the _getSelect method and write a plugin for that.

Not the answer you're looking for? Browse other questions tagged or ask your own question.