function UserListBuilder::buildHeader
Same name in other branches
- 8.9.x core/modules/user/src/UserListBuilder.php \Drupal\user\UserListBuilder::buildHeader()
- 10 core/modules/user/src/UserListBuilder.php \Drupal\user\UserListBuilder::buildHeader()
- 11.x core/modules/user/src/UserListBuilder.php \Drupal\user\UserListBuilder::buildHeader()
Overrides EntityListBuilder::buildHeader
1 call to UserListBuilder::buildHeader()
- UserListBuilder::load in core/
modules/ user/ src/ UserListBuilder.php - Loads entities of this type from storage for listing.
File
-
core/
modules/ user/ src/ UserListBuilder.php, line 82
Class
- UserListBuilder
- Defines a class to build a listing of user entities.
Namespace
Drupal\userCode
public function buildHeader() {
$header = [
'username' => [
'data' => $this->t('Username'),
'field' => 'name',
'specifier' => 'name',
],
'status' => [
'data' => $this->t('Status'),
'field' => 'status',
'specifier' => 'status',
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'roles' => [
'data' => $this->t('Roles'),
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'member_for' => [
'data' => $this->t('Member for'),
'field' => 'created',
'specifier' => 'created',
'sort' => 'desc',
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
'access' => [
'data' => $this->t('Last access'),
'field' => 'access',
'specifier' => 'access',
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
],
];
return $header + parent::buildHeader();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.