diff --git a/core/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php b/core/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php index 08ec1af923..62868006a8 100644 --- a/core/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php +++ b/core/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php @@ -50,7 +50,7 @@ public static function create($resource_type_name) { } /** - * Gets current resource type name of the resource type being built. + * Gets current resource type name of the resource type to be built. * * @return string * The resource type name. @@ -67,12 +67,12 @@ public function disableResourceType() { } /** - * Whether the resource type to be built has been disabled. + * Whether the resource type to be built should be disabled. * * @return bool - * TRUE if the resource type will be disabled, FALSE otherwise. + * TRUE if the resource type should be disabled, FALSE otherwise. */ - public function wasResourceTypeDisabled() { + public function resourceTypeShouldBeDisabled() { return $this->disabled; } diff --git a/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php b/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php index 80491fccf5..27921d1ae8 100644 --- a/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php +++ b/core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php @@ -156,7 +156,7 @@ protected function createResourceType(EntityTypeInterface $entity_type, $bundle) $entity_type->id(), $bundle, $entity_type->getClass(), - $entity_type->isInternal() || $event->wasResourceTypeDisabled(), + $entity_type->isInternal() || $event->resourceTypeShouldBeDisabled(), static::isLocatableResourceType($entity_type, $bundle), static::isMutableResourceType($entity_type, $bundle), static::isVersionableResourceType($entity_type),