protected function DataTables::defineOptions in DataTables 8
Same name and namespace in other branches
- 2.x src/Plugin/views/style/DataTables.php \Drupal\datatables\Plugin\views\style\DataTables::defineOptions()
- 1.x src/Plugin/views/style/DataTables.php \Drupal\datatables\Plugin\views\style\DataTables::defineOptions()
Information about options for all kinds of purposes will be held here.
'option_name' => array(
- 'default' => default value,
- 'contains' => (optional) array of items this contains, with its own
defaults, etc. If contains is set, the default will be ignored and
assumed to be array().
),
Return value
array Returns the options of this handler/plugin.
Overrides Table::defineOptions
File
- src/
Plugin/ views/ style/ DataTables.php, line 42
Class
- DataTables
- Style plugin to render a table as a FooTable.
Namespace
Drupal\datatables\Plugin\views\styleCode
protected function defineOptions() {
$options = parent::defineOptions();
unset($options['sticky']);
unset($options['override']);
$options['elements'] = [
'default' => [
'search_box' => TRUE,
'table_info' => TRUE,
'save_state' => FALSE,
],
];
$options['layout'] = [
'default' => [
'autowidth' => FALSE,
'themeroller' => FALSE,
'sdom' => '',
],
];
$options['pages'] = [
'default' => [
'pagination_style' => 0,
'length_change' => 0,
'display_length' => 10,
],
];
$options['hidden_columns'] = [
'default' => [],
];
return $options;
}