You are here

protected function Fraction::defineOptions in Fraction 8

Same name and namespace in other branches
  1. 2.x src/Plugin/views/field/Fraction.php \Drupal\fraction\Plugin\views\field\Fraction::defineOptions()

@inheritdoc

Overrides FieldPluginBase::defineOptions

File

src/Plugin/views/field/Fraction.php, line 22

Class

Fraction
Field handler for Fraction database columns.

Namespace

Drupal\fraction\Plugin\views\field

Code

protected function defineOptions() {
  $options = parent::defineOptions();

  // Default to automatic precision.
  $options['precision'] = [
    'default' => 0,
  ];
  $options['auto_precision'] = [
    'default' => TRUE,
  ];
  return $options;
}