You are here

public static function PartyPrimaryFields::getFields in Party 7

Get hold of primary field information.

Primary fields are used to cache information from multiple potential data set sources into a single property (or field) on the party.

The Primary Field widget allows you to create primary fields via the Field UI by adding fields to the party with the Primary Field widget.

Parameters

string $target: Optionally provide a target property to retrieve the sources for.

Return value

array If $target is NULL, outer keys are target properties. See PartyPrimaryFields::$primary_fields for a description of the structure.

2 calls to PartyPrimaryFields::getFields()
PartyController::setPrimaryFields in includes/party.entity.inc
Set the primary fields for the party.
party_primary_fields_edit_field in ./party.admin.inc
Form constructor for setting primary field sources.

File

includes/party.primary_fields.inc, line 153
Primary field related functions and callbacks.

Class

PartyPrimaryFields
Helper class for primary fields.

Code

public static function getFields($target = NULL) {
  if (!isset(self::$fields)) {
    self::buildFields();
  }
  if ($target) {
    return isset(self::$fields[$target]) ? self::$fields[$target] : array();
  }
  return self::$fields;
}