You are here

protected function DropdownWidgetType::sanitizeLabel in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  2. 8.2 modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  3. 8.3 modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  4. 8.4 modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  5. 8.5 modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  6. 8.6 modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  7. 8.7 modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  8. 8.8 modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  9. 10.3.x modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  10. 10.0.x modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  11. 10.1.x modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()
  12. 10.2.x modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php \Drupal\dropdown\Plugin\Field\FieldWidget\DropdownWidgetType::sanitizeLabel()

Sanitizes a string label to display as an option.

Parameters

string $label: The label to sanitize.

File

modules/custom/dropdown/src/Plugin/Field/FieldWidget/DropdownWidgetType.php, line 175

Class

DropdownWidgetType
Plugin implementation of the 'dropdown_widget_type' widget.

Namespace

Drupal\dropdown\Plugin\Field\FieldWidget

Code

protected function sanitizeLabel(&$label) {

  // Allow a limited set of HTML tags.
  $label = FieldFilteredMarkup::create($label);
}