You are here

private static function UCXF_FieldList::findByName in Extra Fields Checkout Pane 6.2

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

Search for a field by giving the db_name

@access private @static

Parameters

string $name: The db_name of the field

Return value

UCXF_Field if field is found FALSE otherwise

2 calls to UCXF_FieldList::findByName()
UCXF_FieldList::getFieldByName in class/UCXF_FieldList.class.php
Get a single field by name
UCXF_FieldList::loadOne in class/UCXF_FieldList.class.php
Load a single field if not already loaded

File

class/UCXF_FieldList.class.php, line 422
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 findByName($name) {
  if ($name) {
    foreach (self::$fields as $field) {
      if (isset($field->db_name) && $field->db_name == $name) {
        return $field;
      }
    }
  }
  return FALSE;
}