You are here

class NodeResolver in General Data Protection Regulation 3.0.x

Same name and namespace in other branches
  1. 8.2 modules/gdpr_consent/src/Plugin/Gdpr/ConsentUserResolver/NodeResolver.php \Drupal\gdpr_consent\Plugin\Gdpr\ConsentUserResolver\NodeResolver
  2. 8 modules/gdpr_consent/src/Plugin/Gdpr/ConsentUserResolver/NodeResolver.php \Drupal\gdpr_consent\Plugin\Gdpr\ConsentUserResolver\NodeResolver

Resolves user reference for a Node entity.

@GdprConsentUserResolver( id = "gdpr_consent_node_resolver", label = "GDPR Consent Node Resolver", entityType = "node" ) @package Drupal\gdpr_consent\Plugin\Gdpr\ConsentUserResolver

Hierarchy

Expanded class hierarchy of NodeResolver

File

modules/gdpr_consent/src/Plugin/Gdpr/ConsentUserResolver/NodeResolver.php, line 18

Namespace

Drupal\gdpr_consent\Plugin\Gdpr\ConsentUserResolver
View source
class NodeResolver implements GdprConsentUserResolverInterface {

  /**
   * {@inheritdoc}
   */
  public function resolve(EntityInterface $entity) {
    return $entity->uid->entity;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
NodeResolver::resolve public function Gets the user reference from the specified entity. Overrides GdprConsentUserResolverInterface::resolve