private static function UCXF_FieldList::loadAllFromPane in Extra Fields Checkout Pane 6.2
Same name and namespace in other branches
- 7 class/UCXF_FieldList.class.php \UCXF_FieldList::loadAllFromPane()
Loads all fields from a specific pane type
@access private @static
Parameters
string $pane_type:
Return value
void
Throws
1 call to UCXF_FieldList::loadAllFromPane()
- UCXF_FieldList::getFieldsFromPane in class/
UCXF_FieldList.class.php - Get all fields from a particular pane type
File
- class/
UCXF_FieldList.class.php, line 287 - 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
private static function loadAllFromPane($pane_type) {
// Reasons to skip out early
if (self::$allLoaded) {
return;
}
if (isset(self::$loadedPanes[$pane_type])) {
return;
}
$query = "SELECT * FROM {uc_extra_fields} WHERE pane_type LIKE '%%%s%%' ORDER BY weight";
$result = db_query($query, $pane_type);
if ($result === FALSE) {
throw new UCXF_DbException(t('Failed to read from database table uc_extra_fields'));
}
// Set flag that fields for this pane are loaded
self::$loadedPanes[$pane_type] = TRUE;
self::dbResultToField($result);
}