You are here

public function ToggleEditableFormatter::getBoostrapToogleParameters in Toggle Editable fields 8

Retrieve setting values for given option name.

Parameters

string $name: The name of a setting needed.

Return value

string|null Thrown when the entity can't found the clicked field name.

1 call to ToggleEditableFormatter::getBoostrapToogleParameters()
ToggleEditableFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/ToggleEditableFormatter.php
Returns a short summary for the current formatter settings.

File

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

Class

ToggleEditableFormatter
Plugin implementation of the 'ranking' formatter.

Namespace

Drupal\toggle_editable_fields\Plugin\Field\FieldFormatter

Code

public function getBoostrapToogleParameters($name) {
  $parameters = array_merge($this
    ->bootstrapToggleSizesOptions(), $this
    ->bootstrapToggleStylesOptions());
  if (!isset($parameters[$name])) {
    return NULL;
  }
  return $parameters[$name];
}