You are here

public static function UCXF_FieldList::getFieldsFromPane in Extra Fields Checkout Pane 7

Same name and namespace in other branches
  1. 6.2 class/UCXF_FieldList.class.php \UCXF_FieldList::getFieldsFromPane()

Get all fields from a particular pane type

@access public @static

Parameters

mixed $pane_types: string: fields from single pane are loaded array: fields from multiple panes are loaded

Return value

array

6 calls to UCXF_FieldList::getFieldsFromPane()
UCXFApiTestCase::testUCXF_FieldList in ./uc_extra_fields_pane.test
Test if UCXF_FieldList behaves as excepted.
UCXF_FieldList::getAllAddressFields in class/UCXF_FieldList.class.php
Get all available address fields @access public @static
uc_extra_fields_pane_preprocess_table in ./uc_extra_fields_pane.module
Alters the uc_store_address_fields_form table.
uc_extra_fields_pane_query_uc_get_addresses_alter in ./uc_extra_fields_pane.module
Implements hook_query_TAG_alter().
uc_extra_fields_pane_uc_order in ./uc_extra_fields_pane.module
Implements hook_uc_order().

... See full list

File

class/UCXF_FieldList.class.php, line 124
Contains the UCXF_FieldList class.

Class

UCXF_FieldList
This class is used to keep track of all loaded fields in one request. It's also used as a central place to request fields.

Code

public static function getFieldsFromPane($pane_types) {
  if (is_string($pane_types)) {
    $pane_types = array(
      $pane_types,
    );
  }
  $fields = array();
  foreach ($pane_types as $pane_type) {
    self::loadAllFromPane($pane_type);
    $fields = array_merge($fields, self::findByPane($pane_type));
  }
  uasort($fields, array(
    'UCXF_FieldList',
    'sort',
  ));
  return $fields;
}