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

Breadcrumb

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

function NumericField::defineOptions

Overrides FieldPluginBase::defineOptions

2 calls to NumericField::defineOptions()
NodeNewComments::defineOptions in core/modules/comment/src/Plugin/views/field/NodeNewComments.php
Information about options for all kinds of purposes will be held here.
NodeNewComments::defineOptions in core/modules/comment/src/Plugin/views/field/NodeNewComments.php
Information about options for all kinds of purposes will be held here.
1 method overrides NumericField::defineOptions()
NodeNewComments::defineOptions in core/modules/comment/src/Plugin/views/field/NodeNewComments.php
Information about options for all kinds of purposes will be held here.

File

core/modules/views/src/Plugin/views/field/NumericField.php, line 26

Class

NumericField
Render a field as a numeric value.

Namespace

Drupal\views\Plugin\views\field

Code

protected function defineOptions() {
    $options = parent::defineOptions();
    $options['set_precision'] = [
        'default' => FALSE,
    ];
    $options['precision'] = [
        'default' => 0,
    ];
    $options['decimal'] = [
        'default' => '.',
    ];
    $options['separator'] = [
        'default' => ',',
    ];
    $options['format_plural'] = [
        'default' => FALSE,
    ];
    $options['format_plural_string'] = [
        'default' => '1' . PoItem::DELIMITER . '@count',
    ];
    $options['prefix'] = [
        'default' => '',
    ];
    $options['suffix'] = [
        'default' => '',
    ];
    return $options;
}

API Navigation

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