You are here

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

Same name and namespace in other branches
  1. 7 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

12 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
UCXF_Pane::loadFields in class/UCXF_Pane.class.php
Load fields from db @access protected
uc_extra_fields_pane_addressfields_uc_addresses_get_address_form_alter in includes/addressfields.inc
uc_extra_fields_pane_addressfields_uc_addresses_get_address_form_alter()
uc_extra_fields_pane_addressfields_uc_addresses_get_address_form_submit in includes/addressfields.inc
uc_extra_fields_pane_addressfields_uc_addresses_get_address_form_submit()

... See full list

File

class/UCXF_FieldList.class.php, line 135
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;
}