You are here

public function Account::buildRenderArray in Dashboards with Layout Builder 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/Dashboard/Account.php \Drupal\dashboards\Plugin\Dashboard\Account::buildRenderArray()

Build render array.

Parameters

array $configuration: Plugin configuration.

Return value

array Return render array.

Overrides DashboardBase::buildRenderArray

File

src/Plugin/Dashboard/Account.php, line 74

Class

Account
Show account info.

Namespace

Drupal\dashboards\Plugin\Dashboard

Code

public function buildRenderArray($configuration) : array {
  $user = User::load($this->account
    ->id());
  return $this->entityTypeManager
    ->getViewBuilder($user
    ->getEntityTypeId())
    ->view($user, $configuration['view_mode']);
}