public function SliderProManager::getOptionList in Slider Pro 8
returns array of option sets suitable for using as select list options.
Return value
array
File
- src/
Manager/ SliderProManager.php, line 17
Class
- SliderProManager
- Class SliderProManager @package Drupal\slider_pro\Manager
Namespace
Drupal\slider_pro\ManagerCode
public function getOptionList() {
$optionsets = SliderPro::loadMultiple();
$options = [];
foreach ($optionsets as $name => $optionset) {
/** @var \Drupal\slider_pro\Entity\SliderProInterface $optionset */
$options[$name] = $optionset
->label();
}
if (empty($options)) {
$options[''] = t('No defined option sets');
}
return $options;
}