public function FileSize::buildOptionsForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/field/FileSize.php \Drupal\views\Plugin\views\field\FileSize::buildOptionsForm()
Default options form that provides the label widget that all fields should have.
Overrides FieldPluginBase::buildOptionsForm
File
- core/
modules/ views/ src/ Plugin/ views/ field/ FileSize.php, line 36 - Contains \Drupal\views\Plugin\views\field\FileSize.
Class
- FileSize
- Render a numeric value as a size.
Namespace
Drupal\views\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['file_size_display'] = array(
'#title' => $this
->t('File size display'),
'#type' => 'select',
'#options' => array(
'formatted' => $this
->t('Formatted (in KB or MB)'),
'bytes' => $this
->t('Raw bytes'),
),
);
}