loadProduct example

public function load(array $args): ?ProductEntity
    {
        Feature::triggerDeprecationOrThrow(
            'v6_6_0_0',
            Feature::deprecatedMethodMessage(self::class, __METHOD__, '6.6.0.0')
        );

        [$productId$context] = $args;

        $criteria = new Criteria([$productId]);

        return $this->loadProduct($criteria$context$productId);
    }

    private function lazyLoad(StorableFlow $storableFlow): ?ProductEntity
    {
        $id = $storableFlow->getStore(ProductAware::PRODUCT_ID);
        if ($id === null) {
            return null;
        }

        $criteria = new Criteria([$id]);

        
Home | Imprint | This part of the site doesn't use cookies.