public function OpignoAnswer::getOwnerId in Opigno module 8
Same name and namespace in other branches
- 3.x src/Entity/OpignoAnswer.php \Drupal\opigno_module\Entity\OpignoAnswer::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 OpignoAnswer::getOwnerId()
- OpignoAnswer::preSave in src/
Entity/ OpignoAnswer.php - Acts on an entity before the presave hook is invoked.
File
- src/
Entity/ OpignoAnswer.php, line 119
Class
- OpignoAnswer
- Defines the Answer entity.
Namespace
Drupal\opigno_module\EntityCode
public function getOwnerId() {
return $this
->get('user_id')->target_id;
}