getPropertyIdsOfBacklog example

public function __construct(PropertyIndexer $propertyIndexer)
    {
        $this->propertyIndexer = $propertyIndexer;
    }

    /** * {@inheritdoc} */
    public function synchronize(ShopIndex $shopIndex, array $backlog)
    {
        $ids = $this->getPropertyIdsOfBacklog($backlog);

        if (empty($ids)) {
            return;
        }

        $size = 100;
        $chunks = array_chunk($ids$size);
        foreach ($chunks as $chunk) {
            $this->propertyIndexer->indexProperties($shopIndex$chunk);
        }
    }

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