You are here

protected function RestInspectionTrait::isEntityResource in OpenAPI 8

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.

6 calls to RestInspectionTrait::isEntityResource()
RestGenerator::getPaths in src/Plugin/openapi/OpenApiGenerator/RestGenerator.php
Returns the paths information.
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.
RestGenerator::nonBundleResourcesJson in src/Plugin/openapi/OpenApiGenerator/RestGenerator.php
Return resources for non-entity resources.
RestInspectionTrait::getEntityType in src/RestInspectionTrait.php
Gets the entity type if any for REST resource.

... See full list

File

src/RestInspectionTrait.php, line 73

Class

RestInspectionTrait
Common functions for inspecting REST resources.

Namespace

Drupal\openapi

Code

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