/** * Set default options */ protected function defineOptions() { $options = parent::defineOptions(); $options['type'] = array('default' => 'ul'); $options['class'] = array('default' => ''); $options['wrapper_class'] = array('default' => 'item-list'); return $options; }
/** * {@inheritdoc} */ protected function defineOptions() { $options = parent::defineOptions(); $options['columns'] = array('default' => '4'); $options['automatic_width'] = array('default' => TRUE); $options['alignment'] = array('default' => 'horizontal'); $options['col_class_custom'] = array('default' => ''); $options['col_class_default'] = array('default' => TRUE); $options['row_class_custom'] = array('default' => ''); $options['row_class_default'] = array('default' => TRUE); return $options; }
/** * Overrides Drupal\views\Plugin\views\style\StylePluginBase::defineOptions(). */ protected function defineOptions() { $options = parent::defineOptions(); // Parse the mapping and add a default for each. foreach ($this->defineMapping() as $key => $value) { $default = !empty($value['#multiple']) ? array() : ''; $options['mapping']['contains'][$key] = array('default' => isset($value['#default_value']) ? $value['#default_value'] : $default); if (!empty($value['#toggle'])) { $options['mapping']['contains']["toggle_{$key}"] = array('default' => FALSE, 'bool' => TRUE); } } return $options; }