You are here

public function FlexiformFormEntityCurrentUser::getEntity in Flexiform 8

Get the Entity.

Overrides FlexiformFormEntityBase::getEntity

File

src/Plugin/FlexiformFormEntity/FlexiformFormEntityCurrentUser.php, line 25

Class

FlexiformFormEntityCurrentUser
Form Entity plugin.

Namespace

Drupal\flexiform\Plugin\FlexiformFormEntity

Code

public function getEntity() {
  $uid = \Drupal::currentUser()
    ->id();
  return entity_load('user', $uid);
}