function lingotek_grid_define_columns in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.bulk_grid.inc \lingotek_grid_define_columns()
- 7.4 lingotek.bulk_grid.inc \lingotek_grid_define_columns()
- 7.5 lingotek.bulk_grid.inc \lingotek_grid_define_columns()
Defines which columns should be shown for source and target tables, and what the defaults should be.
Parameters
bool $source: Changes whether settings for source or target variables are output
Return value
array $columns Associative array with two important inner arrays: 1: 'columns' points to the allowed columns, 2: 'defaults' points to the base defaults to use when resetting the customization The 'columns' and 'defaults' arrays are output with the keys and the values being the same
2 calls to lingotek_grid_define_columns()
- lingotek_grid_build_column_checkboxes in ./
lingotek.bulk_grid.inc - Builds the checkbox elements for customizing The Grid's columns Uses predefined defaults specified in 'lingotek_grid_define_columns'
- lingotek_grid_reset_columns in ./
lingotek.bulk_grid.inc - Cleans up the grid_custom or config_custom session array, restoring the predefined defaults.
File
- ./
lingotek.bulk_grid.inc, line 952
Code
function lingotek_grid_define_columns($entity_type) {
$columns = array();
$columns['columns'] = array(
'nid' => 'nid',
'content_type' => 'content_type',
'title' => 'title',
'language' => 'language',
'translations' => 'translations',
'configuration' => 'configuration',
'document_id' => 'document_id',
'workflow' => 'workflow',
'changed' => 'changed',
'last_uploaded' => 'last_uploaded',
'actions' => 'actions',
);
$columns['defaults'] = array(
'title' => 'title',
'language' => 'language',
'translations' => 'translations',
'configuration' => 'configuration',
'content_type' => 'content_type',
'actions' => 'actions',
'changed' => 'changed',
);
if ($entity_type == 'taxonomy_term') {
$columns['columns']['description'] = 'description';
$columns['defaults']['description'] = 'description';
}
return $columns;
}