You are here

public function ElevateZoomPlusManager::getOptionsetOptions in ElevateZoom Plus 8

Returns available options for select options.

@todo remove if BlazyManager has it.

1 call to ElevateZoomPlusManager::getOptionsetOptions()
ElevateZoomPlusManager::formElementAlter in src/ElevateZoomPlusManager.php
Implements hook_blazy_form_element_alter().

File

src/ElevateZoomPlusManager.php, line 85

Class

ElevateZoomPlusManager
Provides ElevateZoom Plus library methods mainly for hooks.

Namespace

Drupal\elevatezoomplus

Code

public function getOptionsetOptions($entity_type = '') {
  if (!isset($this->optionsetOptions)) {
    $optionsets = [];
    foreach ($this->manager
      ->entityLoadMultiple($entity_type) as $key => $entity) {
      $optionsets[$key] = strip_tags($entity
        ->label());
    }
    $this->optionsetOptions = $optionsets;
  }
  return $this->optionsetOptions;
}