vendor/shopware/core/Content/Media/DataAbstractionLayer/MediaRepositoryDecorator.php line 59

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Media\DataAbstractionLayer;
  3. use Shopware\Core\Framework\Context;
  4. use Shopware\Core\Framework\DataAbstractionLayer\EntityDefinition;
  5. use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
  6. use Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenContainerEvent;
  7. use Shopware\Core\Framework\DataAbstractionLayer\Search\AggregationResult\AggregationResultCollection;
  8. use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
  9. use Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearchResult;
  10. use Shopware\Core\Framework\DataAbstractionLayer\Search\IdSearchResult;
  11. use Shopware\Core\Framework\DataAbstractionLayer\Write\CloneBehavior;
  12. use Shopware\Core\Framework\Log\Package;
  13. /**
  14.  * @deprecated tag:v6.5.0 - reason:remove-decorator - Will be removed
  15.  */
  16. #[Package('core')]
  17. class MediaRepositoryDecorator implements EntityRepositoryInterface
  18. {
  19.     /**
  20.      * @var EntityRepositoryInterface
  21.      */
  22.     private $innerRepo;
  23.     /**
  24.      * @internal
  25.      */
  26.     public function __construct(EntityRepositoryInterface $innerRepo)
  27.     {
  28.         $this->innerRepo $innerRepo;
  29.     }
  30.     public function delete(array $idsContext $context): EntityWrittenContainerEvent
  31.     {
  32.         return $this->innerRepo->delete($ids$context);
  33.     }
  34.     // Unchanged methods
  35.     public function aggregate(Criteria $criteriaContext $context): AggregationResultCollection
  36.     {
  37.         return $this->innerRepo->aggregate($criteria$context);
  38.     }
  39.     public function searchIds(Criteria $criteriaContext $context): IdSearchResult
  40.     {
  41.         return $this->innerRepo->searchIds($criteria$context);
  42.     }
  43.     public function clone(string $idContext $context, ?string $newId null, ?CloneBehavior $behavior null): EntityWrittenContainerEvent
  44.     {
  45.         return $this->innerRepo->clone($id$context$newId$behavior);
  46.     }
  47.     public function search(Criteria $criteriaContext $context): EntitySearchResult
  48.     {
  49.         return $this->innerRepo->search($criteria$context);
  50.     }
  51.     public function update(array $dataContext $context): EntityWrittenContainerEvent
  52.     {
  53.         return $this->innerRepo->update($data$context);
  54.     }
  55.     public function upsert(array $dataContext $context): EntityWrittenContainerEvent
  56.     {
  57.         return $this->innerRepo->upsert($data$context);
  58.     }
  59.     public function create(array $dataContext $context): EntityWrittenContainerEvent
  60.     {
  61.         return $this->innerRepo->create($data$context);
  62.     }
  63.     public function createVersion(string $idContext $context, ?string $name null, ?string $versionId null): string
  64.     {
  65.         return $this->innerRepo->createVersion($id$context$name$versionId);
  66.     }
  67.     public function merge(string $versionIdContext $context): void
  68.     {
  69.         $this->innerRepo->merge($versionId$context);
  70.     }
  71.     public function getDefinition(): EntityDefinition
  72.     {
  73.         return $this->innerRepo->getDefinition();
  74.     }
  75. }