Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Grid.php

function 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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal