Skip to content

Commit 1017cbc

Browse files
authored
docs(entity_access): Add param comments to entity_access data producer (#1374)
1 parent 0fdee57 commit 1017cbc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Plugin/GraphQL/DataProducer/Entity/EntityAccess.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,16 @@ class EntityAccess extends DataProducerPluginBase {
3838
* Resolver.
3939
*
4040
* @param \Drupal\Core\Entity\EntityInterface $entity
41+
* The entity to check access for.
4142
* @param string $operation
43+
* The access operation, for example "view".
4244
* @param \Drupal\Core\Session\AccountInterface $user
45+
* The user account access should be checked for.
46+
* @param \Drupal\graphql\GraphQL\Execution\FieldContext $context
47+
* The context to add caching information to.
4348
*
4449
* @return bool
50+
* TRUE when access to the entity is allowed, FALSE otherwise.
4551
*/
4652
public function resolve(EntityInterface $entity, ?string $operation, ?AccountInterface $user, FieldContext $context) {
4753
$result = $entity->access($operation ?? 'view', $user, TRUE);

0 commit comments

Comments
 (0)