You are here

public function FormHelper::formatPriority in Simple XML sitemap 4.x

Same name and namespace in other branches
  1. 8.3 src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::formatPriority()
  2. 8.2 src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::formatPriority()

Parameters

string $priority:

Return value

string

1 call to FormHelper::formatPriority()
FormHelper::getPrioritySelectValues in src/Form/FormHelper.php
Gets the values needed to display the priority dropdown setting.

File

src/Form/FormHelper.php, line 553

Class

FormHelper
Class FormHelper

Namespace

Drupal\simple_sitemap\Form

Code

public function formatPriority(string $priority) : string {
  return number_format((double) $priority, 1, '.', '');
}