| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- declare(strict_types=1);
- namespace App\DataProvider\Common;
- use ApiPlatform\Core\DataProvider\DenormalizedIdentifiersAwareItemDataProviderInterface;
- use ApiPlatform\Core\DataProvider\RestrictedDataProviderInterface;
- /**
- * Class OpentalentItemDataProvider : : Décoration du dataProvider item par défaut d'API Platform
- * @package App\DataProvider\Common
- */
- final class OpentalentItemDataProvider implements DenormalizedIdentifiersAwareItemDataProviderInterface, RestrictedDataProviderInterface
- {
- private DenormalizedIdentifiersAwareItemDataProviderInterface $decorated;
- public function __construct(DenormalizedIdentifiersAwareItemDataProviderInterface $decorated)
- {
- $this->decorated = $decorated;
- }
- public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
- {
- return $this->decorated->supports($resourceClass, $operationName, $context);
- }
- /**
- * @inheritDoc
- */
- public function getItem(string $resourceClass, $id, string $operationName = null, array $context = [])
- {
- return $this->decorated->getItem($resourceClass, $id, $operationName, $context);
- }
- }
|