// ...
use Shopware\Bundle\EmotionBundle\ComponentHandler\ComponentHandlerInterface;
class MyComponentHandler implements ComponentHandlerInterface
{
public function prepare(PrepareDataCollection $collection, Element $element, ShopContextInterface $context)
{
// Here is where I need the ID of the current/active category - the category that the user
// is viewing and that includes this component in its shopping world
}
// ...
}
Можно ли вообще этого достичь, и если да, то как бы это сделать?