vendor/shopware/core/Content/Category/Exception/CategoryNotFoundException.php line 8

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Category\Exception;
  3. use Shopware\Core\Framework\ShopwareHttpException;
  4. use Symfony\Component\HttpFoundation\Response;
  5. class CategoryNotFoundException extends ShopwareHttpException
  6. {
  7.     public function __construct(string $categoryId)
  8.     {
  9.         parent::__construct(
  10.             'Category "{{ categoryId }}" not found.',
  11.             ['categoryId' => $categoryId]
  12.         );
  13.     }
  14.     public function getStatusCode(): int
  15.     {
  16.         return Response::HTTP_NOT_FOUND;
  17.     }
  18.     public function getErrorCode(): string
  19.     {
  20.         return 'CONTENT__CATEGORY_NOT_FOUND';
  21.     }
  22. }