You are here

public function Task::getOwnerId in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 modules/gdpr_tasks/src/Entity/Task.php \Drupal\gdpr_tasks\Entity\Task::getOwnerId()
  2. 3.0.x modules/gdpr_tasks/src/Entity/Task.php \Drupal\gdpr_tasks\Entity\Task::getOwnerId()

Returns the entity owner's user ID.

Return value

int|null The owner user ID, or NULL in case the user ID field has not been set on the entity.

Overrides EntityOwnerInterface::getOwnerId

File

modules/gdpr_tasks/src/Entity/Task.php, line 94

Class

Task
Defines the Task entity.

Namespace

Drupal\gdpr_tasks\Entity

Code

public function getOwnerId() {
  return $this
    ->get('user_id')->target_id;
}