public static function EntityOwnerTrait::getDefaultEntityOwner in Profile 8
Default value callback for 'owner' base field.
Return value
mixed A default value for the owner field.
File
- src/
EntityOwnerTrait.php, line 91
Class
- EntityOwnerTrait
- Provides a trait for entities that have an owner.
Namespace
Drupal\profileCode
public static function getDefaultEntityOwner() {
return \Drupal::currentUser()
->id();
}