diff -u b/core/modules/user/lib/Drupal/user/Controller/UserListController.php b/core/modules/user/lib/Drupal/user/Controller/UserListController.php --- b/core/modules/user/lib/Drupal/user/Controller/UserListController.php +++ b/core/modules/user/lib/Drupal/user/Controller/UserListController.php @@ -16,7 +16,9 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** - * @todo. + * Lists user entities. + * + * @see \Drupal\user\Entity\User */ class UserListController extends EntityListController implements EntityControllerInterface { @@ -77,11 +79,34 @@ */ public function buildHeader() { $header = array( - 'username' => array('data' => $this->t('Username'), 'field' => 'name', 'specifier' => 'name'), - 'status' => array('data' => $this->t('Status'), 'field' => 'status', 'specifier' => 'status', 'class' => array(RESPONSIVE_PRIORITY_LOW)), - 'roles' => array('data' => $this->t('Roles'), 'class' => array(RESPONSIVE_PRIORITY_LOW)), - 'member_for' => array('data' => $this->t('Member for'), 'field' => 'created', 'specifier' => 'created', 'sort' => 'desc', 'class' => array(RESPONSIVE_PRIORITY_LOW)), - 'access' => array('data' => $this->t('Last access'), 'field' => 'access', 'specifier' => 'access', 'class' => array(RESPONSIVE_PRIORITY_LOW)), + 'username' => array( + 'data' => $this->t('Username'), + 'field' => 'name', + 'specifier' => 'name', + ), + 'status' => array( + 'data' => $this->t('Status'), + 'field' => 'status', + 'specifier' => 'status', + 'class' => array(RESPONSIVE_PRIORITY_LOW), + ), + 'roles' => array( + 'data' => $this->t('Roles'), + 'class' => array(RESPONSIVE_PRIORITY_LOW), + ), + 'member_for' => array( + 'data' => $this->t('Member for'), + 'field' => 'created', + 'specifier' => 'created', + 'sort' => 'desc', + 'class' => array(RESPONSIVE_PRIORITY_LOW), + ), + 'access' => array( + 'data' => $this->t('Last access'), + 'field' => 'access', + 'specifier' => 'access', + 'class' => array(RESPONSIVE_PRIORITY_LOW), + ), ); return $header + parent::buildHeader(); } @@ -110,7 +135,9 @@ '#items' => $users_roles, ); $row['member_for'] = format_interval(REQUEST_TIME - $entity->getCreatedTime()); - $row['access'] = $entity->access ? $this->t('@time ago', array('@time' => format_interval(REQUEST_TIME - $entity->getLastAccessedTime()))) : t('never'); + $row['access'] = $entity->access ? $this->t('@time ago', array( + '@time' => format_interval(REQUEST_TIME - $entity->getLastAccessedTime()), + )) : t('never'); return $row + parent::buildRow($entity); }