generateImages example

if (!$useNumberAsId && $id <= 0) {
            throw new ApiException\CustomValidationException('Invalid product id');
        }

        /** @var Article|null $product */
        $product = $this->resource->getRepository()->find($id);

        if (!$product) {
            throw new ApiException\NotFoundException(sprintf('Product by id %d not found', $id));
        }

        $this->resource->generateImages($product(bool) $request->getParam('force', 0));

        $this->View()->assign(['success' => true]);
    }

    /** * Controller Action for the batchAction * Blocks batch actions implemented by the extended class * * @throws RuntimeException */
    public function batchAction()
    {
Home | Imprint | This part of the site doesn't use cookies.