Skip to content

Commit 063814a

Browse files
authored
Merge pull request #679 from tienvx/fix-identifier
Fix wrong identifier
2 parents ecb1fbe + 1961768 commit 063814a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/data-providers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ final class BlogPostItemDataProvider implements ItemDataProviderInterface, Restr
101101
return BlogPost::class === $resourceClass;
102102
}
103103
104-
public function getItem(string $resourceClass, $identifiers, string $operationName = null, array $context = []): ?BlogPost
104+
public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?BlogPost
105105
{
106106
// Retrieve the blog post item from somewhere then return it or null if not found
107-
return new BlogPost($identifiers['id']);
107+
return new BlogPost($id);
108108
}
109109
}
110110
```

0 commit comments

Comments
 (0)