You are here

protected function GridStackSettingsForm::getOptionsets in GridStack 8.2

Returns available optionsets.

1 call to GridStackSettingsForm::getOptionsets()
GridStackSettingsForm::buildForm in modules/gridstack_ui/src/Form/GridStackSettingsForm.php
Implements \Drupal\Core\Form\FormInterface::buildForm().

File

modules/gridstack_ui/src/Form/GridStackSettingsForm.php, line 205

Class

GridStackSettingsForm
Defines the GridStack admin settings form.

Namespace

Drupal\gridstack_ui\Form

Code

protected function getOptionsets() {
  if (!isset($this->optionsets)) {
    $optionsets = [];
    foreach ($this->manager
      ->entityLoadMultiple('gridstack') as $key => $entity) {
      $optionsets[$key] = Html::escape($entity
        ->label());
    }
    $this->optionsets = $optionsets;
  }
  return $this->optionsets;
}