src/Schema/AircraftSchema.php line 10

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Schema;
  4. use App\Entity\Aircraft;
  5. use Neomerx\JsonApi\Schema\BaseSchema;
  6. final class AircraftSchema extends BaseSchema implements SchemaInterface
  7. {
  8.     /**
  9.      * @var string
  10.      */
  11.     protected $resourceType 'aircrafts';
  12.     public static function getEntity(): string
  13.     {
  14.         return Aircraft::class;
  15.     }
  16.     /**
  17.      * @param Aircraft $resource
  18.      */
  19.     public function getAttributes($resource, array $fieldKeysFilter null): ?array
  20.     {
  21.         return [];
  22.     }
  23.     /**
  24.      * @param Aircraft $resource
  25.      */
  26.     public function getId($resource): ?string
  27.     {
  28.         return $resource->id;
  29.     }
  30. }