You are here

public function FormHelper::getPrioritySelectValues in Simple XML sitemap 8.2

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

Gets the values needed to display the priority dropdown setting.

Return value

array Select options.

1 call to FormHelper::getPrioritySelectValues()
FormHelper::displayEntitySettings in src/Form/FormHelper.php

File

src/Form/FormHelper.php, line 431

Class

FormHelper
Class FormHelper @package Drupal\simple_sitemap\Form

Namespace

Drupal\simple_sitemap\Form

Code

public function getPrioritySelectValues() {
  $options = [];
  foreach (range(0, self::PRIORITY_HIGHEST) as $value) {
    $value = $this
      ->formatPriority($value / self::PRIORITY_DIVIDER);
    $options[$value] = $value;
  }
  return $options;
}