You are here

public function ResourceType::getPath in JSON:API 8

Same name and namespace in other branches
  1. 8.2 src/ResourceType/ResourceType.php \Drupal\jsonapi\ResourceType\ResourceType::getPath()

Get the resource path.

Return value

string The path to access this resource type. Default: /entity_type_id/bundle.

See also

jsonapi.base_path

File

src/ResourceType/ResourceType.php, line 276

Class

ResourceType
Value object containing all metadata for a JSON API resource type.

Namespace

Drupal\jsonapi\ResourceType

Code

public function getPath() {
  return sprintf('/%s/%s', $this
    ->getEntityTypeId(), $this
    ->getBundle());
}