You are here

protected function Table::defineOptions in Views Aggregator Plus 8

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/Table.php, line 32

Class

Table
Style plugin to render each item as a row in a table.

Namespace

Drupal\views_aggregator\Plugin\views\style

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['group_aggregation'] = [
    'contains' => [
      'group_aggregation_results' => [
        'default' => 0,
      ],
      'result_label_prefix' => [
        'default' => '',
      ],
      'result_label_suffix' => [
        'default' => '',
      ],
      'grouping_row_class' => [
        'default' => '',
      ],
      'grouping_field_class' => [
        'default' => '',
      ],
    ],
  ];
  $options['column_aggregation'] = [
    'contains' => [
      'totals_per_page' => [
        'default' => TRUE,
      ],
      'totals_row_position' => [
        'default' => [
          1 => 0,
          2 => 2,
          3 => 0,
        ],
      ],
      'totals_row_class' => [
        'default' => '',
      ],
      'precision' => [
        'default' => 2,
      ],
    ],
  ];
  return $options;
}