Loading core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php +20 −17 Original line number Diff line number Diff line Loading @@ -118,7 +118,10 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Ent */ public function all() { $cached = $this->cache->get('jsonapi.resource_types', FALSE); if ($cached === FALSE) { if ($cached) { return $cached->data; } $resource_types = []; foreach ($this->entityTypeManager->getDefinitions() as $entity_type) { $bundles = array_keys($this->entityTypeBundleInfo->getBundleInfo($entity_type->id())); Loading @@ -134,8 +137,8 @@ public function all() { $resource_type->setRelatableResourceTypes($relatable_resource_types); } $this->cache->set('jsonapi.resource_types', $resource_types, Cache::PERMANENT, $this->cacheTags); } return $cached ? $cached->data : $resource_types; return $resource_types; } /** Loading Loading
core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php +20 −17 Original line number Diff line number Diff line Loading @@ -118,7 +118,10 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Ent */ public function all() { $cached = $this->cache->get('jsonapi.resource_types', FALSE); if ($cached === FALSE) { if ($cached) { return $cached->data; } $resource_types = []; foreach ($this->entityTypeManager->getDefinitions() as $entity_type) { $bundles = array_keys($this->entityTypeBundleInfo->getBundleInfo($entity_type->id())); Loading @@ -134,8 +137,8 @@ public function all() { $resource_type->setRelatableResourceTypes($relatable_resource_types); } $this->cache->set('jsonapi.resource_types', $resource_types, Cache::PERMANENT, $this->cacheTags); } return $cached ? $cached->data : $resource_types; return $resource_types; } /** Loading