You are here

protected function RestInspectionTrait::isEntityResource in OpenAPI for REST 8.2

Determines if an REST resource is for an entity.

Parameters

\Drupal\rest\RestResourceConfigInterface $resource_config: The REST config resource.

Return value

bool True if the resource represents a Drupal entity.

5 calls to RestInspectionTrait::isEntityResource()
RestGenerator::getPaths in src/Plugin/openapi/OpenApiGenerator/RestGenerator.php
RestGenerator::getResourceSecurity in src/Plugin/openapi/OpenApiGenerator/RestGenerator.php
Get the security information for the a resource.
RestGenerator::getRouteForResourceMethod in src/Plugin/openapi/OpenApiGenerator/RestGenerator.php
Gets the matching for route for the resource and method.
RestInspectionTrait::getEntityType in src/RestInspectionTrait.php
Gets the entity type if any for REST resource.
RestInspectionTrait::getResourceConfigs in src/RestInspectionTrait.php
Gets the REST config resources.

File

src/RestInspectionTrait.php, line 73

Class

RestInspectionTrait
Common functions for inspecting REST resources.

Namespace

Drupal\openapi_rest

Code

protected function isEntityResource(RestResourceConfigInterface $resource_config) {
  $resource_plugin = $resource_config
    ->getResourcePlugin();
  return $resource_plugin instanceof EntityResource;
}