You are here

public function FormHelper::getPrioritySelectValues 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::getPrioritySelectValues()
  2. 8.2 src/Form/FormHelper.php \Drupal\simple_sitemap\Form\FormHelper::getPrioritySelectValues()

Gets the values needed to display the priority dropdown setting.

Return value

array

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

File

src/Form/FormHelper.php, line 517

Class

FormHelper
Class FormHelper

Namespace

Drupal\simple_sitemap\Form

Code

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