protected function Numeric::defineOptions in Views (for Drupal 7) 8.3
Same name in this branch
- 8.3 lib/Drupal/views/Plugin/views/filter/Numeric.php \Drupal\views\Plugin\views\filter\Numeric::defineOptions()
- 8.3 lib/Drupal/views/Plugin/views/argument/Numeric.php \Drupal\views\Plugin\views\argument\Numeric::defineOptions()
- 8.3 lib/Drupal/views/Plugin/views/field/Numeric.php \Drupal\views\Plugin\views\field\Numeric::defineOptions()
Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
- 'default' => default value,
- 'translatable' => (optional) TRUE/FALSE (wrap in t() on export if true),
- 'contains' => (optional) array of items this contains, with its own defaults, etc. If contains is set, the default will be ignored and assumed to be array().
- 'bool' => (optional) TRUE/FALSE Is the value a boolean value. This will change the export format to TRUE/FALSE instead of 1/0.
),
Return value
array Returns the options of this handler/plugin.
Overrides FieldPluginBase::defineOptions
2 calls to Numeric::defineOptions()
- NodeNewComments::defineOptions in lib/
Views/ comment/ Plugin/ views/ field/ NodeNewComments.php - Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
- Score::defineOptions in lib/
Views/ search/ Plugin/ views/ field/ Score.php - Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
2 methods override Numeric::defineOptions()
- NodeNewComments::defineOptions in lib/
Views/ comment/ Plugin/ views/ field/ NodeNewComments.php - Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
- Score::defineOptions in lib/
Views/ search/ Plugin/ views/ field/ Score.php - Information about options for all kinds of purposes will be held here. @code 'option_name' => array(
File
- lib/
Drupal/ views/ Plugin/ views/ field/ Numeric.php, line 27 - Definition of Drupal\views\Plugin\views\field\Numeric.
Class
- Numeric
- Render a field as a numeric value
Namespace
Drupal\views\Plugin\views\fieldCode
protected function defineOptions() {
$options = parent::defineOptions();
$options['set_precision'] = array(
'default' => FALSE,
'bool' => TRUE,
);
$options['precision'] = array(
'default' => 0,
);
$options['decimal'] = array(
'default' => '.',
'translatable' => TRUE,
);
$options['separator'] = array(
'default' => ',',
'translatable' => TRUE,
);
$options['format_plural'] = array(
'default' => FALSE,
'bool' => TRUE,
);
$options['format_plural_singular'] = array(
'default' => '1',
);
$options['format_plural_plural'] = array(
'default' => '@count',
);
$options['prefix'] = array(
'default' => '',
'translatable' => TRUE,
);
$options['suffix'] = array(
'default' => '',
'translatable' => TRUE,
);
return $options;
}