You are here

public function FormHelper::formatPriority in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 8.2 src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::formatPriority()
  2. 4.x 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 571

Class

FormHelper
Class FormHelper @package Drupal\simple_sitemap\Form

Namespace

Drupal\simple_sitemap\Form

Code

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