Same name and namespace in other branches
  1. 8.x-1.x src/Form/ColorboxSettingsForm.php \Drupal\colorbox\Form\ColorboxSettingsForm::optionsRange() 1 comment

Create a range for a series of options.

Parameters

int $start: The start of the range.

int $end: The end of the range.

int $step: The interval between elements.

Return value

array An options array for the given range.

1 call to ColorboxSettingsForm::optionsRange()
ColorboxSettingsForm::buildForm in src/Form/ColorboxSettingsForm.php

File

src/Form/ColorboxSettingsForm.php, line 501

Class

ColorboxSettingsForm
General configuration form for controlling the colorbox behaviour..

Namespace

Drupal\colorbox\Form

Code

protected function optionsRange($start, $end, $step) {
    $range = range($start, $end, $step);
    return array_combine($range, $range);
}