Skip to content

Presenter is required for checking requirements of Slevomat\UI\ProductList\ProductListFiltersControl::createComponentPrice() #369

@kukulich

Description

@kukulich

Version: 3.2.9

Bug Description

AccessPolicy is broken when subcomponent is created in createComponent() method

Steps To Reproduce

	protected function createComponentProductListFilters(): ProductListFiltersControl
	{
		$control = $this->productListFiltersControlFactory->create();

		/** @var ProductListPriceFilterControl $priceFilterControl */
		$priceFilterControl = $control->getComponent('price');
		$priceFilterControl->setShortcuts($this->priceFilterShortcuts);

		return $control;
	}

The problem is, that the ProductListPriceFilterControl is created before createComponentProductListFilters() is finished so there's no presenter in ProductListFiltersControl.

Expected Behavior

It would be nice if it worked the same as in the previous version :)

Possible Solution

Revert of 8a0fb85 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions