Beispiel #1
0
 /**
  * Initiate grid
  */
 protected static function setGrid()
 {
     parent::$grid = ['grid' => ['name' => ['title' => t('Name'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'username' => ['title' => t('Username'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'email' => ['title' => t('Email'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => '']], 'moderator' => ['title' => t('Moderator'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => 'width:100px']], 'admin' => ['title' => t('Admin'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => 'width:100px']], 'karma' => ['title' => t('Karma'), 'order' => true, 'filter' => ['type' => 'input', 'sanitize' => 'string', 'style' => 'width:100px']], 'status' => ['title' => t('Status'), 'order' => true, 'filter' => ['type' => 'select', 'sanitize' => 'int', 'using' => null, 'values' => Users::getStatusesWithLabels(), 'style' => 'width: 100px;']], 'null' => ['title' => t('Actions')]], 'query' => ['columns' => ['a.id', "CONCAT(a.firstname, ' ', a.lastname) as name ", 'a.username', 'a.gender', 'a.email', 'a.status', 'a.admin', 'a.moderator', 'a.karma'], 'joins' => [], 'groupBy' => 'a.id']];
 }