You are here

function _ajax_loader_get_options in Ajax loader 7

Returns all throbbers as option array.

Return value

array

1 call to _ajax_loader_get_options()
_ajax_loader_settings_form in includes/settings.ajax_loader.inc
Renders ajax loader settings form.

File

includes/settings.ajax_loader.inc, line 117
Contains ajax loader settings form.

Code

function _ajax_loader_get_options() {
  $options = array(
    '' => '- Select -',
  );

  // Module definied throbbers.
  $options = array_merge($options, ThrobberTypes::toArray());

  // Custom user definied throbbers.
  if ($throbbers = ThrobberManager::processUserDefinedThrobbers()) {
    foreach ($throbbers as $throbber) {

      /** @var ThrobberInterface $throbber */
      $options = array_merge($options, array(
        get_class($throbber) => $throbber
          ->getLabel(),
      ));
    }
  }
  return $options;
}