You are here

public function OpignoActivity::getOwnerId in Opigno module 8

Same name and namespace in other branches
  1. 3.x src/Entity/OpignoActivity.php \Drupal\opigno_module\Entity\OpignoActivity::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

1 call to OpignoActivity::getOwnerId()
OpignoActivity::preSave in src/Entity/OpignoActivity.php
Acts on an entity before the presave hook is invoked.

File

src/Entity/OpignoActivity.php, line 142

Class

OpignoActivity
Defines the Activity entity.

Namespace

Drupal\opigno_module\Entity

Code

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