You are here

public function UCXF_Field::to_array in Extra Fields Checkout Pane 6.2

Same name and namespace in other branches
  1. 7 class/UCXF_Field.class.php \UCXF_Field::to_array()

Return as an array of values. @access public

Return value

array

1 call to UCXF_Field::to_array()
UCXF_Field::save in class/UCXF_Field.class.php
save() Saves field in database @access public

File

class/UCXF_Field.class.php, line 185
Contains the UCXF_Field class.

Class

UCXF_Field
Base class for a Extra Fields Pane field

Code

public function to_array() {
  $aOutput = array();

  // Return fields as specified in the schema.
  $schema = drupal_get_schema('uc_extra_fields');
  if (!empty($schema['fields']) && is_array($schema['fields'])) {
    foreach ($schema['fields'] as $field => $info) {
      $aOutput[$field] = $this
        ->__get($field);
    }
  }
  return $aOutput;
}