...Человеческий поиск в разработке...
- Модуль: catalog
- Путь к файлу: ~/bitrix/modules/catalog/lib/controller/productimage.php
- Класс: BitrixCatalogControllerProductImage
- Вызов: ProductImage::getAction
public function getAction(int $id, int $productId, CRestServer $restServer = null): ?array { $product = $this->getProduct($productId); if (!$product) { $this->addError(new Error('Product was not found')); return null; } $r = $this->checkPermissionProductRead($product); if (!$r->isSuccess()) { $this->addErrors($r->getErrors()); return null; } $r = $this->hasImage($id, $product); if (!$r->isSuccess()) { $this->addErrors($r->getErrors()); return null; } /** @var BaseImage $image */ $image = $product->getImageCollection()->findById($id); return ['PRODUCT_IMAGE' => $this->prepareFileStructure($image, $restServer)]; }