You are here

public function ToggleEditableFormatter::bootstrapToggleStylesOptions in Toggle Editable fields 8

Return all styles options for boostrapToggle plugin.

Return value

array A list of options to be use with boostrapToggle plugin.

2 calls to ToggleEditableFormatter::bootstrapToggleStylesOptions()
ToggleEditableFormatter::getBoostrapToogleParameters in src/Plugin/Field/FieldFormatter/ToggleEditableFormatter.php
Retrieve setting values for given option name.
ToggleEditableFormatter::settingsForm in src/Plugin/Field/FieldFormatter/ToggleEditableFormatter.php
Returns a form to configure settings for the formatter.

File

src/Plugin/Field/FieldFormatter/ToggleEditableFormatter.php, line 125

Class

ToggleEditableFormatter
Plugin implementation of the 'ranking' formatter.

Namespace

Drupal\toggle_editable_fields\Plugin\Field\FieldFormatter

Code

public function bootstrapToggleStylesOptions() {
  return [
    'default' => $this
      ->t('Default'),
    'primary' => $this
      ->t('Primary'),
    'success' => $this
      ->t('Success'),
    'info' => $this
      ->t('Info'),
    'warning' => $this
      ->t('Warning'),
    'danger' => $this
      ->t('Danger'),
  ];
}