protected function GroupRoleUIController::roleTableHeaders in Group 7
Generates the table headers for the role table.
1 call to GroupRoleUIController::roleTableHeaders()
- GroupRoleUIController::roleTable in classes/
group_role.ui_controller.inc - Generate an overview table for group roles matching the given conditions.
File
- classes/
group_role.ui_controller.inc, line 239 - Defines the Entity API UI class for group roles.
Class
- GroupRoleUIController
- UI class for group roles.
Code
protected function roleTableHeaders() {
$header = array();
// Optionally add the tabledrag spacer.
if ($this->tabledrag) {
$header['drag'] = array(
'data' => NULL,
'colspan' => 2,
);
}
$header['label'] = t('Name');
$header['permissions'] = t('Permissions');
// Add Entity API related columns.
if ($ops = $this
->roleOperations()) {
$count = count($ops);
// Add the status column if available.
if (in_array('status', $ops)) {
$header['status'] = t('Status');
$count--;
}
// Add the actions column if available.
if ($count) {
$header['actions'] = array(
'data' => t('Actions'),
'colspan' => $count,
);
}
}
return $header;
}