function Grid::defineOptions

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/style/Grid.php \Drupal\views\Plugin\views\style\Grid::defineOptions()
  2. 8.9.x core/modules/views/src/Plugin/views/style/Grid.php \Drupal\views\Plugin\views\style\Grid::defineOptions()
  3. 11.x core/modules/views/src/Plugin/views/style/Grid.php \Drupal\views\Plugin\views\style\Grid::defineOptions()

Overrides StylePluginBase::defineOptions

File

core/modules/views/src/Plugin/views/style/Grid.php, line 32

Class

Grid
Style plugin to render each item in a grid cell.

Namespace

Drupal\views\Plugin\views\style

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['columns'] = [
    'default' => '4',
  ];
  $options['automatic_width'] = [
    'default' => TRUE,
  ];
  $options['alignment'] = [
    'default' => 'horizontal',
  ];
  $options['col_class_custom'] = [
    'default' => '',
  ];
  $options['col_class_default'] = [
    'default' => TRUE,
  ];
  $options['row_class_custom'] = [
    'default' => '',
  ];
  $options['row_class_default'] = [
    'default' => TRUE,
  ];
  return $options;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.