getPicker example


    }

    public function pickItems(DiscountLineItem $discount, DiscountPackageCollection $scopePackages): DiscountPackageCollection
    {
        $pickerKey = $discount->getFilterPickerKey();

        // we start by modifying our packages         // with the currently set picker, if available         // this restructures our packages         if (!empty($pickerKey)) {
            $picker = $this->registry->getPicker($pickerKey);

            // get the new list of packages to consider             $scopePackages = $picker->pickItems($scopePackages);
        }

        return $scopePackages;
    }
}
Home | Imprint | This part of the site doesn't use cookies.