You are here

function _uc_ajax_admin_checkout_trigger_options in Ubercart 8.4

Same name and namespace in other branches
  1. 7.3 uc_ajax_admin/uc_ajax_admin.module \_uc_ajax_admin_checkout_trigger_options()

Builds a hierarchical list of possible ajax triggers for the checkout form.

Parameters

$form: The fully processed checkout form to search for triggers.

Return value

array An hierarchical array of select options, categorized by pane.

1 call to _uc_ajax_admin_checkout_trigger_options()
AjaxAdminForm::buildForm in uc_ajax_admin/src/Form/AjaxAdminForm.php

File

uc_ajax_admin/uc_ajax_admin.module, line 125
Configures Ajax behaviours on the Ubercart checkout page.

Code

function _uc_ajax_admin_checkout_trigger_options($form) {
  $list = [];
  foreach (Element::children($form['panes']) as $name) {
    $group = ucfirst($name);
    $list[$group] = [];
    _uc_ajax_admin_list_triggers($form['panes'][$name], $list[$group]);
    if (empty($list[$group])) {
      unset($list[$group]);
    }
  }
  return $list;
}