lazyLoad example

return $stored;
    }

    public function restore(StorableFlow $storable): void
    {
        if (!$storable->hasStore(OrderTransactionAware::ORDER_TRANSACTION_ID)) {
            return;
        }

        $storable->lazy(
            OrderTransactionAware::ORDER_TRANSACTION,
            $this->lazyLoad(...)
        );
    }

    /** * @param array<int, mixed> $args * * @deprecated tag:v6.6.0 - Will be removed in v6.6.0.0 */
    public function load(array $args): ?OrderTransactionEntity
    {
        Feature::triggerDeprecationOrThrow(
            
public function restore(StorableFlow $storable): void
    {
        if (!$storable->hasStore(CustomerAware::CUSTOMER_ID)) {
            return;
        }

        $storable->setData(CustomerAware::CUSTOMER_ID, $storable->getStore(CustomerAware::CUSTOMER_ID));

        $storable->lazy(
            CustomerAware::CUSTOMER,
            $this->lazyLoad(...)
        );
    }

    /** * @param array<int, mixed> $args * * @deprecated tag:v6.6.0 - Will be removed in v6.6.0.0 */
    public function load(array $args): ?CustomerEntity
    {
        Feature::triggerDeprecationOrThrow(
            
return $stored;
    }

    public function restore(StorableFlow $storable): void
    {
        if (!$storable->hasStore(NewsletterRecipientAware::NEWSLETTER_RECIPIENT_ID)) {
            return;
        }

        $storable->lazy(
            NewsletterRecipientAware::NEWSLETTER_RECIPIENT,
            $this->lazyLoad(...)
        );
    }

    /** * @param array<int, mixed> $args * * @deprecated tag:v6.6.0 - Will be removed in v6.6.0.0 */
    public function load(array $args): ?NewsletterRecipientEntity
    {
        Feature::triggerDeprecationOrThrow(
            
public function restore(StorableFlow $storable): void
    {
        if (!$storable->hasStore(OrderAware::ORDER_ID)) {
            return;
        }

        $storable->setData(OrderAware::ORDER_ID, $storable->getStore(OrderAware::ORDER_ID));

        $storable->lazy(
            OrderAware::ORDER,
            $this->lazyLoad(...)
        );
    }

    /** * @param array<int, mixed> $args * * @deprecated tag:v6.6.0 - Will be removed in v6.6.0.0 */
    public function load(array $args): ?OrderEntity
    {
        Feature::triggerDeprecationOrThrow(
            
return $stored;
    }

    public function restore(StorableFlow $storable): void
    {
        if (!$storable->hasStore(UserAware::USER_RECOVERY_ID)) {
            return;
        }

        $storable->lazy(
            UserAware::USER_RECOVERY,
            $this->lazyLoad(...)
        );
    }

    /** * @param array<int, mixed> $args * * @deprecated tag:v6.6.0 - Will be removed in v6.6.0.0 */
    public function load(array $args): ?UserRecoveryEntity
    {
        Feature::triggerDeprecationOrThrow(
            
public function restore(StorableFlow $storable): void
    {
        if (!$storable->hasStore(CustomerGroupAware::CUSTOMER_GROUP_ID)) {
            return;
        }

        $storable->setData(CustomerGroupAware::CUSTOMER_GROUP_ID, $storable->getStore(CustomerGroupAware::CUSTOMER_GROUP_ID));

        $storable->lazy(
            CustomerGroupAware::CUSTOMER_GROUP,
            $this->lazyLoad(...)
        );
    }

    /** * @param array<int, mixed> $args * * @deprecated tag:v6.6.0 - Will be removed in v6.6.0.0 */
    public function load(array $args): ?CustomerGroupEntity
    {
        Feature::triggerDeprecationOrThrow(
            
$eventName = strtolower($eventName);
        $this->listenerIds[$eventName][] = [$callback[0]$callback[1]$priority];
    }

    /** * {@inheritdoc} */
    public function removeListener(Enlight_Event_Handler $handler)
    {
        $eventName = strtolower($handler->getName());
        $this->lazyLoad($eventName);

        if (isset($this->listenerIds[$eventName])) {
            $listener = $handler->getListener();

            foreach ($this->listenerIds[$eventName] as $i => list($serviceId$method$priority)) {
                $key = $serviceId . '.' . $method;

                if (isset($this->containerListeners[$eventName][$key]) && $listener === [$this->containerListeners[$eventName][$key]$method]) {
                    unset($this->containerListeners[$eventName][$key]);
                    if (empty($this->containerListeners[$eventName])) {
                        unset($this->containerListeners[$eventName]);
                    }
return $stored;
    }

    public function restore(StorableFlow $storable): void
    {
        if (!$storable->hasStore(CustomerRecoveryAware::CUSTOMER_RECOVERY_ID)) {
            return;
        }

        $storable->lazy(
            CustomerRecoveryAware::CUSTOMER_RECOVERY,
            $this->lazyLoad(...)
        );
    }

    /** * @param array<int, mixed> $args * * @deprecated tag:v6.6.0 - Will be removed in v6.6.0.0 */
    public function load(array $args): ?CustomerRecoveryEntity
    {
        Feature::triggerDeprecationOrThrow(
            
return $stored;
    }

    public function restore(StorableFlow $storable): void
    {
        if (!$storable->hasStore(ProductAware::PRODUCT_ID)) {
            return;
        }

        $storable->lazy(
            ProductAware::PRODUCT,
            $this->lazyLoad(...)
        );
    }

    /** * @param array<int, mixed> $args * * @deprecated tag:v6.6.0 - Will be removed in v6.6.0.0 */
    public function load(array $args): ?ProductEntity
    {
        Feature::triggerDeprecationOrThrow(
            
Home | Imprint | This part of the site doesn't use cookies.