CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
MetadataField Class Reference

Object representing a locally-defined type of metadata field. More...

## Public Member Functions
| Status ()
| Get current error status of object. More...
| Type ($NewValue=DB_NOVALUE)
| Get/set type of metadata field (enumerated value). More...
| TypeAsName ()
| Get type of field as string. More...
| IsControlledVocabularyField ()
| Check whether field is a type that uses controlled vocabularies. More...
| SchemaId ()
| Get ID of schema for field. More...
| GetDisplayName ()
| Get display name for field. More...
| Name ($NewName=DB_NOVALUE)
| Get/set name of field. More...
| Label ($NewLabel=DB_NOVALUE)
| Get/set label for field. More...
| GetAllowedConversionTypes ()
| Get metadata field types that this field can be converted to. More...
| IsTempItem ($NewSetting=NULL)
| Get/set whether field is temporary instance. More...
| AuthoringPrivileges ($NewValue=NULL)
| Get/set privileges that allowing authoring values for this field. More...
| EditingPrivileges ($NewValue=NULL)
| Get/set privileges that allowing editing values for this field. More...
| ViewingPrivileges ($NewValue=NULL)
| Get/set privileges that allowing viewing values for this field. More...
| PreviewingPrivileges ($NewValue=NULL)
| Get/set privileges that allowing previewing values for this field. More...
| Id ()
| Get metadata field ID. More...
| DBFieldName ()
| Get base name of database column used to store metadata field value. More...
| Description ($NewValue=DB_NOVALUE)
| Get/set field description. More...
| Instructions ($NewValue=DB_NOVALUE)
| Get/set field instructions. More...
| Owner ($NewValue=DB_NOVALUE)
| Get/set field owner. More...
| Enabled ($NewValue=DB_NOVALUE)
| Get/set whether field is enabled. More...
| Optional ($NewValue=DB_NOVALUE)
| Get/set whether a value is required for this field. More...
| Editable ($NewValue=DB_NOVALUE)
| Get/set whether this field is editable. More...
| AllowMultiple ($NewValue=DB_NOVALUE)
| Get/set whether to allow multiple values for field. More...
| IncludeInKeywordSearch ($NewValue=DB_NOVALUE)
| Get/set whether to include field in keyword search. More...
| IncludeInAdvancedSearch ($NewValue=DB_NOVALUE)
| Get/set whether to include field in advanced search. More...
| IncludeInFacetedSearch ($NewValue=DB_NOVALUE)
| Get/set whether to include field in faceted search. More...
| SearchGroupLogic ($NewValue=DB_NOVALUE)
| Get/set the search group logic, used for both facets and advanced search when more than one value is selected for this field. More...
| IncludeInSortOptions ($NewValue=DB_NOVALUE)
| Get/set whether to include field in search result sort options. More...
| IncludeInRecommender ($NewValue=DB_NOVALUE)
| Get/set whether to include field in recommender system comparisons. More...
| CopyOnResourceDuplication ($NewValue=DB_NOVALUE)
| Get/set whether to duplciate this field when a resource is duplicated. More...
| TextFieldSize ($NewValue=DB_NOVALUE)
| Get/set the width of text fields. More...
| MaxLength ($NewValue=DB_NOVALUE)
| Get/set maximum length to store in a text field. More...
| ParagraphRows ($NewValue=DB_NOVALUE)
| Get/set the number of rows to display for a paragraph field. More...
| ParagraphCols ($NewValue=DB_NOVALUE)
| Get/set the number of columns to display for a paragraph field. More...
| MinValue ($NewValue=DB_NOVALUE)
| Get/set the minimum value allowed for a number field. More...
| MaxValue ($NewValue=DB_NOVALUE)
| Get/set the maximum allowed value for a number field. More...
| FlagOnLabel ($NewValue=DB_NOVALUE)
| Get/set the label displayed when a flag field is 'on'. More...
| FlagOffLabel ($NewValue=DB_NOVALUE)
| Get/set the label displayed when a flag field is 'off'. More...
| DateFormat ($NewValue=DB_NOVALUE)
| Get/set the date format. More...
| SearchWeight ($NewValue=DB_NOVALUE)
| Get/set the weight this field has for search results (higher weights have a larger impact). More...
| RecommenderWeight ($NewValue=DB_NOVALUE)
| Get/set the weight this field has for recommendations (higher weights have a larger impact). More...
| MaxHeight ($NewValue=DB_NOVALUE)
| Get/set the max width (in pixels) of images. More...
| MaxWidth ($NewValue=DB_NOVALUE)
| Get/set the max width (in pixels) of images. More...
| MaxPreviewHeight ($NewValue=DB_NOVALUE)
| Get/set the max height (in pixels) of thumbnail images. More...
| MaxPreviewWidth ($NewValue=DB_NOVALUE)
| Get/set the max width (in pixels) of thumbnail images. More...
| MaxThumbnailHeight ($NewValue=DB_NOVALUE)
| Get/set the max height (in pixels) of thumbnail images. More...
| MaxThumbnailWidth ($NewValue=DB_NOVALUE)
| Get/set the max width (in pixels) of thumbnail images. More...
| DefaultAltText ($NewValue=DB_NOVALUE)
| Get/set the default alt text for this field. More...
| UsesQualifiers ($NewValue=DB_NOVALUE)
| Get/set if this field uses qualifiers. More...
| ShowQualifiers ($NewValue=DB_NOVALUE)
| Get/set if this field should display qualifiers on EditResource. More...
| DefaultQualifier ($NewValue=DB_NOVALUE)
| Get/set the default qualifier for this field. More...
| AllowHTML ($NewValue=DB_NOVALUE)
| Get/set if this field should allow HTML. More...
| UseWysiwygEditor ($NewValue=DB_NOVALUE)
| Get/set if this field should enable WYSIWYG editing. More...
| UseForOaiSets ($NewValue=DB_NOVALUE)
| Get/set if this field should be used to create OAI sets. More...
| DisplayAsListForAdvancedSearch ($NewValue=DB_NOVALUE)
| Get/set if this field should be displayed as a list on the advanced search page. More...
| MaxDepthForAdvancedSearch ($NewValue=DB_NOVALUE)
| Get/set maximum depth of classifications to display in the list view on the AdvancedSearch page. More...
| OptionListThreshold ($NewValue=DB_NOVALUE)
| Get/set the number of results necessary to active option list menus. More...
| AjaxThreshold ($NewValue=DB_NOVALUE)
| Get/set the number of results necessary to activate the AJAX dropdown. More...
| NumAjaxResults ($NewValue=DB_NOVALUE)
| Get/set the maximum number of results to display in an AJAX dropdown. More...
| RequiredBySPT ($NewValue=DB_NOVALUE)
| Get/set 'RequiredBySPT'. More...
| PointPrecision ($NewValue=DB_NOVALUE)
| Get/set the current number of digits after the decimal point. More...
| PointDecimalDigits ($NewValue=DB_NOVALUE)
| Get/set the total number of digits a point field should store. More...
| DefaultValue ($NewValue=DB_NOVALUE)
| Get/set default value. More...
| UpdateMethod ($NewValue=DB_NOVALUE)
| Get/set method by which field is updated. More...
| GetPossibleValues ($MaxNumberOfValues=NULL, $Offset=0)
| get possible values (only meaningful for Trees, Controlled Names, Options, Flags, and Users) More...
| GetCountOfPossibleValues ()
| Get count of possible values (only meaningful for Trees, Controlled Names, Options, and Users) More...
| LoadVocabulary ($Vocab)
| Load new from a Vocabulary or a vocabulary file. More...
| GetIdForValue ($Value)
| Get ID for specified value (only meaningful for Trees / Controlled Names / Options) More...
| GetValueForId ($Id)
| Get value for specified ID (only meaningful for Trees / Controlled Names / Options) More...
| ValueUseCount ($Value)
| Check how many times a specific value is currently used for this field. More...
| HasItemLevelQualifiers ($NewValue=DB_NOVALUE)
| Get/set whether field uses item-level qualifiers. More...
| AssociatedQualifierList ()
| Get list of qualifiers associated with field. More...
| UnassociatedQualifierList ()
| Get list of qualifiers not associated with field. More...
| AddQualifier ($Qualifier)
| Associate qualifier with field. More...
| UnassociateWithQualifier ($QualifierIdOrObject)
| Delete a qualifier association. More...
| GetFactory ()
| Retrieve item factory object for this field. More...
| UserCanView ($User, $AllowHooksToModify=TRUE)
| Determine if a user can view a specified field in the absence of a resource. More...
| ReferenceableSchemaIds ($Ids=DB_NOVALUE)
| Get/set the list of SchemaIds that provide allowable values for a reference field. More...
| Duplicate ()
| Create duplicate of field. More...
| __construct ($FieldId)
| Object contstructor, used to load an existing metadata field. More...
| SetDefaults ()
| Set defaults values for the field. More...
| Drop ()
| Remove field from database (only for use by MetadataSchema object). More...
| Viewable ()
| AssociateWithQualifier ($Qualifier)
| UserPrivilegeRestrictions ($NewValue=DB_NOVALUE)
| AuthoringUserIsValue ($NewValue=DB_NOVALUE)
| EditingUserIsValue ($NewValue=DB_NOVALUE)
| ViewingUserValue ($NewValue=DB_NOVALUE)
| AuthoringUserValue ($NewValue=DB_NOVALUE)
| EditingUserValue ($NewValue=DB_NOVALUE)
| ViewingUserIsValue ($NewValue=DB_NOVALUE)
| EnableOnOwnerReturn ($NewValue=DB_NOVALUE)
| ViewingPrivilege ($NewValue=DB_NOVALUE)
| AuthoringPrivilege ($NewValue=DB_NOVALUE)
| EditingPrivilege ($NewValue=DB_NOVALUE)
| ImagePreviewPrivilege ($NewValue=DB_NOVALUE)
| TreeBrowsingPrivilege ($NewValue=DB_NOVALUE)

## Static Public Member Functions
static | Create ($SchemaId, $FieldType, $FieldName, $Optional=NULL, $DefaultValue=NULL)
| Create a new metadata field. More...

## Public Attributes
const | UPDATEMETHOD_NOAUTOUPDATE = "NoAutoUpdate"
const | UPDATEMETHOD_ONRECORDCREATE = "OnRecordCreate"
const | UPDATEMETHOD_BUTTON = "Button"
const | UPDATEMETHOD_ONRECORDEDIT = "OnRecordEdit"
const | UPDATEMETHOD_ONRECORDCHANGE = "OnRecordChange"
const | USERISVALUE_OR = -1
const | USERISVALUE_UNSET = 0
const | USERISVALUE_AND = 1

## Static Public Attributes
static | $FieldTypeHumanEnums
| A map of metadata field types to human-readable strings. More...
static | $FieldTypeDBEnums
static | $FieldTypeDBAllowedEnums
static | $FieldTypePHPEnums
static | $UpdateTypes
static | $FixedDefaults
| The metadata field defaults that are the same for all field types. More...
static | $TypeBasedDefaults
| The metadata field defaults that vary depending on the field type. More...

## Detailed Description

Object representing a locally-defined type of metadata field.

Definition at line 13 of file MetadataField.php.

## Constructor & Destructor Documentation

MetadataField::__construct | ( |  | $FieldId | ) |

Object contstructor, used to load an existing metadata field.

To create new fields, use

Parameters

  int | $FieldId | ID of metadata field to load.

Returns
  object New MetadataField object.

Definition at line 1874 of file MetadataField.php.

References AuthoringPrivileges(), EditingPrivileges(), Id(), MetadataSchema\MDFSTAT_OK, PreviewingPrivileges(), and ViewingPrivileges().

## Member Function Documentation

MetadataField::AddQualifier | ( |  | $Qualifier | ) |

Associate qualifier with field.

Parameters

  mixed | $Qualifier | Qualifer ID, name, or object.

Exceptions

  InvalidArgumentException | If unknown name supplied.

Definition at line 1494 of file MetadataField.php.

References Id().

Referenced by AssociateWithQualifier(), and LoadVocabulary().

Here is the caller graph for this function:

MetadataField::AjaxThreshold | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the number of results necessary to activate the AJAX dropdown.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 894 of file MetadataField.php.

MetadataField::AllowHTML | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set if this field should allow HTML.

Parameters

  bool | $NewValue | Updated value (OPTIONAL).

Returns
  bool Current setting.

Definition at line 832 of file MetadataField.php.

MetadataField::AllowMultiple | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether to allow multiple values for field.

Parameters

  bool | $NewValue | TRUE to allow multiple values, or FALSE if only one value may be set. (OPTIONAL)

Returns
  bool TRUE if field allows multiple values, otherwise FALSE.

Definition at line 521 of file MetadataField.php.

Referenced by DefaultValue().

Here is the caller graph for this function:

MetadataField::AssociatedQualifierList | ( |  | ) |

Get list of qualifiers associated with field.

Returns
  array Associated qualifiers.

Definition at line 1451 of file MetadataField.php.

Referenced by UnassociatedQualifierList().

Here is the caller graph for this function:

MetadataField::AssociateWithQualifier | ( |  | $Qualifier | ) |

See also
  AddQualifier()

Definition at line 2786 of file MetadataField.php.

References AddQualifier().

MetadataField::AuthoringPrivilege | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2865 of file MetadataField.php.

References AuthoringPrivileges(), and DB_NOVALUE.

MetadataField::AuthoringPrivileges | ( |  | $NewValue = `NULL` | ) |

Get/set privileges that allowing authoring values for this field.

Parameters

  object | $NewValue | New PrivilegeSet value. (OPTIONAL)

Returns
  object PrivilegeSet that allows authoring.

Definition at line 362 of file MetadataField.php.

Referenced by __construct(), and AuthoringPrivilege().

Here is the caller graph for this function:

MetadataField::AuthoringUserIsValue | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2816 of file MetadataField.php.

MetadataField::AuthoringUserValue | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2832 of file MetadataField.php.

MetadataField::CopyOnResourceDuplication | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether to duplciate this field when a resource is duplicated.

Parameters

  bool | $NewValue | Update setting.

Returns
  Current setting.

Definition at line 610 of file MetadataField.php.

static MetadataField::Create | ( |  | $SchemaId,
|  |  | $FieldType,
|  |  | $FieldName,
|  |  | $Optional = `NULL`,
|  |  | $DefaultValue = `NULL`
| ) |  |
| static

Create a new metadata field.

Parameters

  int | $SchemaId | ID of schema in which to place field.
  enum | $FieldType | Metadata field type.
  string | $FieldName | Name of metadata field.
  bool | $Optional | If FALSE, field must always have a value. (OPTIONAL, defaults to TRUE)
  mixed | $DefaultValue | Default value for field.

Returns
  object New MetadataField object.

Exceptions

  InvalidArgumentException | When field type is invalid.
  InvalidArgumentException | When field name is duplicates name of another existing field.

Definition at line 1757 of file MetadataField.php.

References MetadataSchema\ClearStaticCaches().

Referenced by MetadataSchema\AddField().

Here is the caller graph for this function:

MetadataField::DateFormat | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the date format.

Parameters

  string | $NewValue | Updated value (OPTIONAL).

Returns
  string Current setting.

Definition at line 700 of file MetadataField.php.

MetadataField::DBFieldName | ( |  | ) |

Get base name of database column used to store metadata field value.

(Only valid for some field types.)

Returns
  string Column name.

Definition at line 447 of file MetadataField.php.

Referenced by Drop(), and HasItemLevelQualifiers().

Here is the caller graph for this function:

MetadataField::DefaultAltText | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the default alt text for this field.

Parameters

  string | $NewValue | Updated value (OPTIONAL).

Returns
  string Current setting.

Definition at line 792 of file MetadataField.php.

MetadataField::DefaultQualifier | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the default qualifier for this field.

Parameters

  mixed | $NewValue | Updated value (OPTIONAL).

Returns
  mixed Current setting.

Definition at line 822 of file MetadataField.php.

MetadataField::DefaultValue | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set default value.

Parameters

  mixed | $NewValue | Updated value (OPTIONAL).

Returns
  mixed Current setting.

Definition at line 986 of file MetadataField.php.

References AllowMultiple(), DB_NOVALUE, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_POINT, and Type().

Referenced by Drop().

Here is the caller graph for this function:

MetadataField::Description | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set field description.

Parameters

  string | $NewValue | Updated description. (OPTIONAL)

Returns
  string Current field description.

Definition at line 457 of file MetadataField.php.

MetadataField::DisplayAsListForAdvancedSearch | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set if this field should be displayed as a list on the advanced search page.

Parameters

  bool | $NewValue | Updated value (OPTIONAL).

Returns
  bool Current setting.

Definition at line 863 of file MetadataField.php.

MetadataField::Drop | ( |  | ) |

Remove field from database (only for use by MetadataSchema object).

Definition at line 2098 of file MetadataField.php.

References StdLib\CheckMyCaller(), MetadataSchema\ClearStaticCaches(), Classification\Create(), DATEPRE_BEGINDAY, DATEPRE_BEGINMONTH, DB_NOVALUE, DBFieldName(), DefaultValue(), GetFactory(), MetadataFieldOrder\GetOrdersForSchema(), Id(), MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_DATE, MetadataSchema\MDFTYPE_FILE, MetadataSchema\MDFTYPE_FLAG, MetadataSchema\MDFTYPE_IMAGE, MetadataSchema\MDFTYPE_NUMBER, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_PARAGRAPH, MetadataSchema\MDFTYPE_POINT, MetadataSchema\MDFTYPE_REFERENCE, MetadataSchema\MDFTYPE_TEXT, MetadataSchema\MDFTYPE_TIMESTAMP, MetadataSchema\MDFTYPE_TREE, MetadataSchema\MDFTYPE_URL, MetadataSchema\MDFTYPE_USER, SchemaId(), MetadataSchema\SCHEMAID_DEFAULT, and Type().

MetadataField::Duplicate | ( |  | ) |

Create duplicate of field.

The new field will be a temporary instance, so if it is to persist, IsTempItem() must be called on it with FALSE. The only difference between the original and the duplicate (other than their IDs and possibly the temporary status) is that the duplicate will have "(duplicate YYMMDD-HHMMSS)" appended to the field name.

Returns
  object New duplicate field.

Definition at line 1846 of file MetadataField.php.

References MetadataSchema\ClearStaticCaches(), Id(), Name(), SchemaId(), and Type().

MetadataField::Editable | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether this field is editable.

Parameters

  bool | $NewValue | TRUE to indicate that field is editable, or FALSE to indicate it non-editable. (OPTIONAL)

Returns
  bool TRUE if field is editable, otherwise FALSE.

Definition at line 510 of file MetadataField.php.

MetadataField::EditingPrivilege | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2878 of file MetadataField.php.

References DB_NOVALUE, and EditingPrivileges().

MetadataField::EditingPrivileges | ( |  | $NewValue = `NULL` | ) |

Get/set privileges that allowing editing values for this field.

Parameters

  object | $NewValue | New PrivilegeSet value. (OPTIONAL)

Returns
  object PrivilegeSet that allows editing.

Definition at line 381 of file MetadataField.php.

Referenced by __construct(), and EditingPrivilege().

Here is the caller graph for this function:

MetadataField::EditingUserIsValue | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2822 of file MetadataField.php.

MetadataField::EditingUserValue | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2837 of file MetadataField.php.

MetadataField::Enabled | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether field is enabled.

Parameters

  bool | $NewValue | TRUE to enable field, or FALSE to disable. (OPTIONAL)

Returns
  bool TRUE if field is enabled, otherwise FALSE.

Definition at line 488 of file MetadataField.php.

Referenced by UserCanView().

Here is the caller graph for this function:

MetadataField::EnableOnOwnerReturn | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2847 of file MetadataField.php.

MetadataField::FlagOffLabel | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the label displayed when a flag field is 'off'.

Parameters

  string | $NewValue | Updated value (OPTIONAL).

Returns
  string Current setting.

Definition at line 690 of file MetadataField.php.

Referenced by GetPossibleValues().

Here is the caller graph for this function:

MetadataField::FlagOnLabel | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the label displayed when a flag field is 'on'.

Parameters

  string | $NewValue | Updated value (OPTIONAL).

Returns
  string Current setting.

Definition at line 680 of file MetadataField.php.

Referenced by GetPossibleValues().

Here is the caller graph for this function:

MetadataField::GetAllowedConversionTypes | ( |  | ) |

Get metadata field types that this field can be converted to.

Returns
  array Array with constants (MDFTYPE_ values) for the index and field type strings for the values.

Definition at line 201 of file MetadataField.php.

References MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_DATE, MetadataSchema\MDFTYPE_FILE, MetadataSchema\MDFTYPE_FLAG, MetadataSchema\MDFTYPE_IMAGE, MetadataSchema\MDFTYPE_NUMBER, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_PARAGRAPH, MetadataSchema\MDFTYPE_REFERENCE, MetadataSchema\MDFTYPE_TEXT, MetadataSchema\MDFTYPE_TIMESTAMP, MetadataSchema\MDFTYPE_TREE, MetadataSchema\MDFTYPE_URL, MetadataSchema\MDFTYPE_USER, and Type().

MetadataField::GetCountOfPossibleValues | ( |  | ) |

Get count of possible values (only meaningful for Trees, Controlled Names, Options, and Users)

Returns
  integer Number of possible values.

Definition at line 1146 of file MetadataField.php.

References GetPossibleValues(), Id(), MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_FLAG, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_TREE, MetadataSchema\MDFTYPE_USER, and Type().

MetadataField::GetDisplayName | ( |  | ) |

Get display name for field.

Returns label if available, or field name if label is not set for field.

Returns
  string Display name.

Definition at line 102 of file MetadataField.php.

References Label(), and Name().

MetadataField::GetFactory | ( |  | ) |

Retrieve item factory object for this field.

Returns
  ItemFactory Corresponding factory for this field.

Definition at line 1554 of file MetadataField.php.

References Id(), MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_TREE, and Type().

Referenced by Drop(), and QuickSearchHelper\HighlightSearchString().

Here is the caller graph for this function:

MetadataField::GetIdForValue | ( |  | $Value | ) |

Get ID for specified value (only meaningful for Trees / Controlled Names / Options)

Parameters

  string | $Value | Value to search for.

Returns
  integer|NULL ItemId for the specified value.

Definition at line 1268 of file MetadataField.php.

References Id(), MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_TREE, and Type().

MetadataField::GetPossibleValues | ( |  | $MaxNumberOfValues = `NULL`,
|  |  | $Offset = `0`
| ) |  |

get possible values (only meaningful for Trees, Controlled Names, Options, Flags, and Users)

Parameters

  integer | NULL | $MaxNumberOfValues | Maximum number of values to get.
  integer | $Offset | Offset into the list of values.

Returns
  array ItemIds => Values

Definition at line 1068 of file MetadataField.php.

References FlagOffLabel(), FlagOnLabel(), Id(), MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_FLAG, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_TREE, MetadataSchema\MDFTYPE_USER, Type(), and UserPrivilegeRestrictions().

Referenced by GetCountOfPossibleValues().

Here is the caller graph for this function:

MetadataField::GetValueForId | ( |  | $Id | ) |

Get value for specified ID (only meaningful for Trees / Controlled Names / Options)

Parameters

  int | $Id | ItemId to search for.

Returns
  string|NULL Value for the specified ID.

Definition at line 1303 of file MetadataField.php.

References Id(), MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_TREE, and Type().

MetadataField::HasItemLevelQualifiers | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether field uses item-level qualifiers.

Parameters

  mixed | $NewValue | Updated value (OPTIONAL).

Returns
  bool TRUE if this field users item-lvel qualifiers, FALSE otherwise.

Definition at line 1411 of file MetadataField.php.

References DB_NOVALUE, and DBFieldName().

MetadataField::Id | ( |  | ) |

Get metadata field ID.

Returns
  int Field ID.

Definition at line 437 of file MetadataField.php.

Referenced by __construct(), AddQualifier(), Drop(), Duplicate(), GetCountOfPossibleValues(), GetFactory(), GetIdForValue(), GetPossibleValues(), GetValueForId(), IsTempItem(), LoadVocabulary(), PointDecimalDigits(), and PointPrecision().

Here is the caller graph for this function:

MetadataField::ImagePreviewPrivilege | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2891 of file MetadataField.php.

References DB_NOVALUE, and ViewingPrivileges().

MetadataField::IncludeInAdvancedSearch | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether to include field in advanced search.

Parameters

  bool | $NewValue | TRUE to include field, or FALSE if field should not be included. (OPTIONAL)

Returns
  bool TRUE if field should be included, otherwise FALSE.

Definition at line 543 of file MetadataField.php.

MetadataField::IncludeInFacetedSearch | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether to include field in faceted search.

Parameters

  bool | $NewValue | TRUE to include field, or FALSE if field should not be included. (OPTIONAL)

Returns
  bool TRUE if field should be included, otherwise FALSE.

Definition at line 554 of file MetadataField.php.

MetadataField::IncludeInKeywordSearch | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether to include field in keyword search.

Parameters

  bool | $NewValue | TRUE to include field, or FALSE if field should not be included. (OPTIONAL)

Returns
  bool TRUE if field should be included, otherwise FALSE.

Definition at line 532 of file MetadataField.php.

MetadataField::IncludeInRecommender | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether to include field in recommender system comparisons.

Parameters

  bool | $NewValue | TRUE to include field, or FALSE if field should not be included. (OPTIONAL)

Returns
  bool TRUE if field should be included, otherwise FALSE.

Definition at line 600 of file MetadataField.php.

MetadataField::IncludeInSortOptions | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether to include field in search result sort options.

Parameters

  bool | $NewValue | TRUE to include field, or FALSE if field should not be included. (OPTIONAL)

Returns
  bool TRUE if field should be included, otherwise FALSE.

Definition at line 589 of file MetadataField.php.

MetadataField::Instructions | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set field instructions.

Parameters

  string | $NewValue | Updated instructions. (OPTIONAL)

Returns
  string Current field instructions.

Definition at line 467 of file MetadataField.php.

MetadataField::IsControlledVocabularyField | ( |  | ) |

Check whether field is a type that uses controlled vocabularies.

Returns
  bool TRUE if field type is based on controlled vocabularies, otherwise FALSE.

Definition at line 74 of file MetadataField.php.

References MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_TREE, and Type().

MetadataField::IsTempItem | ( |  | $NewSetting = `NULL` | ) |

Get/set whether field is temporary instance.

Parameters

  bool | $NewSetting | If TRUE, field is a temporary instance, or if FALSE, field is non-temporary. (OPTIONAL)

Returns
  bool If TRUE, field is a temporary instance, or if FALSE, field is non-temporary.

Definition at line 263 of file MetadataField.php.

References MetadataSchema\ClearStaticCaches(), Id(), MetadataSchema\MDFSTAT_ILLEGALNAME, Name(), and SchemaId().

MetadataField::Label | ( |  | $NewLabel = `DB_NOVALUE` | ) |

Get/set label for field.

Parameters

  string | $NewLabel | New label for field. (OPTIONAL)

Returns
  string Current label for field.

Definition at line 170 of file MetadataField.php.

References DB_NOVALUE, and MetadataSchema\MDFSTAT_ILLEGALLABEL.

Referenced by GetDisplayName().

Here is the caller graph for this function:

MetadataField::LoadVocabulary | ( |  | $Vocab | ) |

Load new from a Vocabulary or a vocabulary file.

Parameters

  string | Vocabularly | $Vocab | Path to vocabulary file or Vocabulary object providing the terms to load.

Returns
  number of terms added.

Definition at line 1188 of file MetadataField.php.

References AddQualifier(), Id(), MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_TREE, and Type().

MetadataField::MaxDepthForAdvancedSearch | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set maximum depth of classifications to display in the list view on the AdvancedSearch page.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 874 of file MetadataField.php.

MetadataField::MaxHeight | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the max width (in pixels) of images.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 732 of file MetadataField.php.

MetadataField::MaxLength | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set maximum length to store in a text field.

Parameters

  int | $NewValue | Updated value.

Returns
  int Current setting.

Definition at line 630 of file MetadataField.php.

MetadataField::MaxPreviewHeight | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the max height (in pixels) of thumbnail images.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 752 of file MetadataField.php.

MetadataField::MaxPreviewWidth | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the max width (in pixels) of thumbnail images.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 762 of file MetadataField.php.

MetadataField::MaxThumbnailHeight | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the max height (in pixels) of thumbnail images.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 772 of file MetadataField.php.

MetadataField::MaxThumbnailWidth | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the max width (in pixels) of thumbnail images.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 782 of file MetadataField.php.

MetadataField::MaxValue | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the maximum allowed value for a number field.

Parameters

  float | $NewValue | Updated value (OPTIONAL).

Returns
  float Current setting.

Definition at line 670 of file MetadataField.php.

MetadataField::MaxWidth | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the max width (in pixels) of images.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 742 of file MetadataField.php.

MetadataField::MinValue | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the minimum value allowed for a number field.

Parameters

  float | $NewValue | Updated value.

Returns
  float Current Setting.

Definition at line 660 of file MetadataField.php.

MetadataField::Name | ( |  | $NewName = `DB_NOVALUE` | ) |

Get/set name of field.

Field names are limited to alphanumerics, spaces, and parentheses.

Parameters

  string | $NewName | New field name. (OPTIONAL)

Returns
  string Current field name.

Definition at line 113 of file MetadataField.php.

References DB_NOVALUE, MetadataSchema\MDFSTAT_DUPLICATENAME, MetadataSchema\MDFSTAT_ILLEGALNAME, and MetadataSchema\MDFSTAT_OK.

Referenced by Duplicate(), GetDisplayName(), IsTempItem(), and SetDefaults().

Here is the caller graph for this function:

MetadataField::NumAjaxResults | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the maximum number of results to display in an AJAX dropdown.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 905 of file MetadataField.php.

Referenced by QuickSearchHelper\SearchField().

Here is the caller graph for this function:

MetadataField::Optional | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set whether a value is required for this field.

Parameters

  bool | $NewValue | TRUE to require a value, or FALSE to make entering a value optional. (OPTIONAL)

Returns
  bool TRUE if a value is required, otherwise FALSE.

Definition at line 499 of file MetadataField.php.

MetadataField::OptionListThreshold | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the number of results necessary to active option list menus.

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 884 of file MetadataField.php.

MetadataField::Owner | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set field owner.

Parameters

  string | $NewValue | Updated owner. (OPTIONAL)

Returns
  string Current owner.

Definition at line 477 of file MetadataField.php.

MetadataField::ParagraphCols | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the number of columns to display for a paragraph field.

Parameters

  int | $NewValue | Updated value.

Returns
  int Current setting.

Definition at line 650 of file MetadataField.php.

MetadataField::ParagraphRows | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the number of rows to display for a paragraph field.

Parameters

  int | $NewValue | Updated value.

Returns
  int Current setting.

Definition at line 640 of file MetadataField.php.

MetadataField::PointDecimalDigits | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the total number of digits a point field should store.

Parameters

  integer | $NewValue | Updated value (OPTIONAL).

Returns
  integer Current setting.

Definition at line 956 of file MetadataField.php.

References DB_NOVALUE, Id(), MetadataSchema\MDFTYPE_POINT, and Type().

MetadataField::PointPrecision | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the current number of digits after the decimal point.

Parameters

  integer | $NewValue | Updated value (OPTIONAL).

Returns
  integer Current setting.

Definition at line 927 of file MetadataField.php.

References DB_NOVALUE, Id(), MetadataSchema\MDFTYPE_POINT, and Type().

MetadataField::PreviewingPrivileges | ( |  | $NewValue = `NULL` | ) |

Get/set privileges that allowing previewing values for this field.

Parameters

  object | $NewValue | New PrivilegeSet value. (OPTIONAL)

Returns
  object PrivilegeSet that allows previewing.

Definition at line 419 of file MetadataField.php.

Referenced by __construct().

Here is the caller graph for this function:

MetadataField::RecommenderWeight | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the weight this field has for recommendations (higher weights have a larger impact).

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 722 of file MetadataField.php.

MetadataField::ReferenceableSchemaIds | ( |  | $Ids = `DB_NOVALUE` | ) |

Get/set the list of SchemaIds that provide allowable values for a reference field.

Parameters

  mixed | $Ids | SchemaId or array/ of SchemaIds that are allowed (OPTIONAL).

Returns
  array List of allowed SchemaIds.

Definition at line 1631 of file MetadataField.php.

References DB_NOVALUE.

MetadataField::RequiredBySPT | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set 'RequiredBySPT'.

Parameters

  bool | $NewValue | Updated value (OPTIONAL).

Returns
  bool Current setting.

Definition at line 917 of file MetadataField.php.

MetadataField::SchemaId | ( |  | ) |

Get ID of schema for field.

Returns
  int Schema ID.

Definition at line 92 of file MetadataField.php.

Referenced by Drop(), Duplicate(), IsTempItem(), and UserCanView().

Here is the caller graph for this function:

MetadataField::SearchGroupLogic | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the search group logic, used for both facets and advanced search when more than one value is selected for this field.

Parameters

  bool | $NewValue | One of the SearchEngine::LOGIC_* consts

Returns
  Current SearchGroupLogic setting

Definition at line 566 of file MetadataField.php.

References DB_NOVALUE, SearchEngine\LOGIC_AND, and SearchEngine\LOGIC_OR.

MetadataField::SearchWeight | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the weight this field has for search results (higher weights have a larger impact).

Parameters

  int | $NewValue | Updated value (OPTIONAL).

Returns
  int Current setting.

Definition at line 711 of file MetadataField.php.

MetadataField::SetDefaults | ( |  | ) |

Set defaults values for the field.

Definition at line 2073 of file MetadataField.php.

References Name(), Type(), and UpdateMethod().

MetadataField::ShowQualifiers | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set if this field should display qualifiers on EditResource.

Parameters

  bool | $NewValue | Updated value (OPTIONAL).

Returns
  bool Current setting.

Definition at line 812 of file MetadataField.php.

MetadataField::Status | ( |  | ) |

Get current error status of object.

Returns
  int Error status value drawn from MDFSTAT constants defined in the MetadataSchema class.

Definition at line 34 of file MetadataField.php.

MetadataField::TextFieldSize | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set the width of text fields.

Parameters

  int | $NewValue | Updated value.

Returns
  int Current setting.

Definition at line 620 of file MetadataField.php.

MetadataField::TreeBrowsingPrivilege | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2904 of file MetadataField.php.

References DB_NOVALUE, and ViewingPrivileges().

MetadataField::Type | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set type of metadata field (enumerated value).

Types are MDFTYPE_ constants defined in the MetadataSchema class.

Parameters

  enum | $NewValue | New type for field. (OPTIONAL)

Returns
  enum Current type for field.

Definition at line 45 of file MetadataField.php.

References DB_NOVALUE.

Referenced by DefaultValue(), Drop(), Duplicate(), GetAllowedConversionTypes(), GetCountOfPossibleValues(), GetFactory(), GetIdForValue(), GetPossibleValues(), GetValueForId(), IsControlledVocabularyField(), LoadVocabulary(), PointDecimalDigits(), PointPrecision(), QuickSearchHelper\SearchField(), SetDefaults(), and ValueUseCount().

Here is the caller graph for this function:

MetadataField::TypeAsName | ( |  | ) |

Get type of field as string.

Returns
  string Field type.

Definition at line 64 of file MetadataField.php.

MetadataField::UnassociatedQualifierList | ( |  | ) |

Get list of qualifiers not associated with field.

Returns
  array Qualifiers not associated.

Definition at line 1476 of file MetadataField.php.

References AssociatedQualifierList().

MetadataField::UnassociateWithQualifier | ( |  | $QualifierIdOrObject | ) |

Delete a qualifier association.

Parameters

  mixed | $QualifierIdOrObject | Qualifier to remove from this field.

Definition at line 1535 of file MetadataField.php.

MetadataField::UpdateMethod | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set method by which field is updated.

Parameters

  string | $NewValue | New update method.

Returns
  Existing update method.

Definition at line 1056 of file MetadataField.php.

Referenced by SetDefaults().

Here is the caller graph for this function:

MetadataField::UseForOaiSets | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set if this field should be used to create OAI sets.

Parameters

  bool | $NewValue | Updated value (OPTIONAL).

Returns
  bool Current setting.

Definition at line 852 of file MetadataField.php.

MetadataField::UserCanView | ( |  | $User,
|  |  | $AllowHooksToModify = `TRUE`
| ) |  |

Determine if a user can view a specified field in the absence of a resource.

Parameters

  CWUser | $User | User to check.
  bool | $AllowHooksToModify | Should events should be signaled (OPTIONAL, default TRUE)

Returns
  TRUE when the user can view this field, FALSE otherwise.

Definition at line 1583 of file MetadataField.php.

References Enabled(), SchemaId(), and ViewingPrivileges().

Referenced by Viewable().

Here is the caller graph for this function:

MetadataField::UserPrivilegeRestrictions | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2791 of file MetadataField.php.

References DB_NOVALUE.

Referenced by GetPossibleValues().

Here is the caller graph for this function:

MetadataField::UsesQualifiers | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set if this field uses qualifiers.

Parameters

  bool | $NewValue | Updated value (OPTIONAL).

Returns
  bool Current setting.

Definition at line 802 of file MetadataField.php.

MetadataField::UseWysiwygEditor | ( |  | $NewValue = `DB_NOVALUE` | ) |

Get/set if this field should enable WYSIWYG editing.

Parameters

  bool | $NewValue | Updated value (OPTIONAL).

Returns
  bool Current setting.

Definition at line 842 of file MetadataField.php.

MetadataField::ValueUseCount | ( |  | $Value | ) |

Check how many times a specific value is currently used for this field.

This method is not valid for Date fields.

Parameters

  mixed | $Value | Value to check. For Flag, Tree, Option, Image, and Controlled Name fields this must be an ID or an appropriate object. For Point fields this must be an associative array with two values with "X" and "Y" indexes. Date fields are not supported. For other field types, the literal value to check should be passed in.

Returns
  Number of times values is currently used.

Definition at line 1343 of file MetadataField.php.

References MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_FILE, MetadataSchema\MDFTYPE_FLAG, MetadataSchema\MDFTYPE_IMAGE, MetadataSchema\MDFTYPE_NUMBER, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_PARAGRAPH, MetadataSchema\MDFTYPE_POINT, MetadataSchema\MDFTYPE_TEXT, MetadataSchema\MDFTYPE_TIMESTAMP, MetadataSchema\MDFTYPE_TREE, MetadataSchema\MDFTYPE_URL, MetadataSchema\MDFTYPE_USER, and Type().

MetadataField::Viewable | ( |  | ) |

Definition at line 2778 of file MetadataField.php.

References UserCanView().

MetadataField::ViewingPrivilege | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2852 of file MetadataField.php.

References DB_NOVALUE, and ViewingPrivileges().

MetadataField::ViewingPrivileges | ( |  | $NewValue = `NULL` | ) |

Get/set privileges that allowing viewing values for this field.

Parameters

  object | $NewValue | New PrivilegeSet value. (OPTIONAL)

Returns
  object PrivilegeSet that allows viewing.

Definition at line 400 of file MetadataField.php.

Referenced by __construct(), ImagePreviewPrivilege(), TreeBrowsingPrivilege(), UserCanView(), and ViewingPrivilege().

Here is the caller graph for this function:

MetadataField::ViewingUserIsValue | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2842 of file MetadataField.php.

MetadataField::ViewingUserValue | ( |  | $NewValue = `DB_NOVALUE` | ) |

Definition at line 2827 of file MetadataField.php.

## Member Data Documentation

MetadataField::$FieldTypeDBAllowedEnums
| static

Initial value:
= array(
MetadataSchema::MDFTYPE_TEXT => "Text",
MetadataSchema::MDFTYPE_PARAGRAPH => "Paragraph",
MetadataSchema::MDFTYPE_NUMBER => "Number",
MetadataSchema::MDFTYPE_DATE => "Date",
MetadataSchema::MDFTYPE_TIMESTAMP => "TimeStamp",
MetadataSchema::MDFTYPE_FLAG => "Flag",
MetadataSchema::MDFTYPE_TREE => "Tree",
MetadataSchema::MDFTYPE_CONTROLLEDNAME => "ControlledName",
MetadataSchema::MDFTYPE_OPTION => "Option",
MetadataSchema::MDFTYPE_USER => "User",
MetadataSchema::MDFTYPE_IMAGE => "Still Image",
MetadataSchema::MDFTYPE_FILE => "File",
MetadataSchema::MDFTYPE_URL => "Url",
MetadataSchema::MDFTYPE_POINT => "Point",
MetadataSchema::MDFTYPE_REFERENCE => "Reference"
)

Definition at line 1701 of file MetadataField.php.

Referenced by MetadataSchema\GetAllowedFieldTypes().

MetadataField::$FieldTypeDBEnums
| static

Initial value:
= array(
MetadataSchema::MDFTYPE_TEXT => "Text",
MetadataSchema::MDFTYPE_PARAGRAPH => "Paragraph",
MetadataSchema::MDFTYPE_NUMBER => "Number",
MetadataSchema::MDFTYPE_DATE => "Date",
MetadataSchema::MDFTYPE_TIMESTAMP => "TimeStamp",
MetadataSchema::MDFTYPE_FLAG => "Flag",
MetadataSchema::MDFTYPE_TREE => "Tree",
MetadataSchema::MDFTYPE_CONTROLLEDNAME => "ControlledName",
MetadataSchema::MDFTYPE_OPTION => "Option",
MetadataSchema::MDFTYPE_USER => "User",
MetadataSchema::MDFTYPE_IMAGE => "Still Image",
MetadataSchema::MDFTYPE_FILE => "File",
MetadataSchema::MDFTYPE_URL => "Url",
MetadataSchema::MDFTYPE_POINT => "Point",
MetadataSchema::MDFTYPE_REFERENCE => "Reference"
)

Definition at line 1684 of file MetadataField.php.

Referenced by MetadataSchema\GetFieldTypes(), and HumanMetadataField\Type().

array MetadataField::$FieldTypeHumanEnums
| static

Initial value:
= array(
MetadataSchema::MDFTYPE_TEXT => "Text",
MetadataSchema::MDFTYPE_PARAGRAPH => "Paragraph",
MetadataSchema::MDFTYPE_NUMBER => "Number",
MetadataSchema::MDFTYPE_DATE => "Date",
MetadataSchema::MDFTYPE_TIMESTAMP => "Timestamp",
MetadataSchema::MDFTYPE_FLAG => "Flag",
MetadataSchema::MDFTYPE_TREE => "Tree",
MetadataSchema::MDFTYPE_CONTROLLEDNAME => "Controlled Name",
MetadataSchema::MDFTYPE_OPTION => "Option",
MetadataSchema::MDFTYPE_USER => "User",
MetadataSchema::MDFTYPE_IMAGE => "Image",
MetadataSchema::MDFTYPE_FILE => "File",
MetadataSchema::MDFTYPE_URL => "URL",
MetadataSchema::MDFTYPE_POINT => "Point",
MetadataSchema::MDFTYPE_REFERENCE => "Reference")

A map of metadata field types to human-readable strings.

Definition at line 1666 of file MetadataField.php.

MetadataField::$FieldTypePHPEnums
| static

Initial value:
= array(
"Text" => MetadataSchema::MDFTYPE_TEXT,
"Paragraph" => MetadataSchema::MDFTYPE_PARAGRAPH,
"Number" => MetadataSchema::MDFTYPE_NUMBER,
"Date" => MetadataSchema::MDFTYPE_DATE,
"TimeStamp" => MetadataSchema::MDFTYPE_TIMESTAMP,
"Flag" => MetadataSchema::MDFTYPE_FLAG,
"Tree" => MetadataSchema::MDFTYPE_TREE,
"ControlledName" => MetadataSchema::MDFTYPE_CONTROLLEDNAME,
"Option" => MetadataSchema::MDFTYPE_OPTION,
"User" => MetadataSchema::MDFTYPE_USER,
"Still Image" => MetadataSchema::MDFTYPE_IMAGE,
"File" => MetadataSchema::MDFTYPE_FILE,
"Url" => MetadataSchema::MDFTYPE_URL,
"Point" => MetadataSchema::MDFTYPE_POINT,
"Reference" => MetadataSchema::MDFTYPE_REFERENCE
)

Definition at line 1718 of file MetadataField.php.

Referenced by MetadataSchema\GetFields().

array MetadataField::$FixedDefaults
| static

The metadata field defaults that are the same for all field types.

Definition at line 1934 of file MetadataField.php.

array MetadataField::$TypeBasedDefaults
| static

The metadata field defaults that vary depending on the field type.

Definition at line 1986 of file MetadataField.php.

MetadataField::$UpdateTypes
| static

Initial value:
= array(
self::UPDATEMETHOD_NOAUTOUPDATE => "Do not update automatically",
self::UPDATEMETHOD_ONRECORDCREATE => "Update on record creation",
self::UPDATEMETHOD_BUTTON => "Provide an update button",
self::UPDATEMETHOD_ONRECORDEDIT => "Update when record is edited",
self::UPDATEMETHOD_ONRECORDCHANGE => "Update when record is changed"
)

Definition at line 1736 of file MetadataField.php.

Referenced by HumanMetadataField\UpdateMethod().

const MetadataField::UPDATEMETHOD_BUTTON = "Button"

Definition at line 20 of file MetadataField.php.

const MetadataField::UPDATEMETHOD_NOAUTOUPDATE = "NoAutoUpdate"

Definition at line 18 of file MetadataField.php.

const MetadataField::UPDATEMETHOD_ONRECORDCHANGE = "OnRecordChange"

Definition at line 22 of file MetadataField.php.

Referenced by FieldEditingUI\ApplyChangesToResource(), and UserEditingUI\UpdateUserFields().

const MetadataField::UPDATEMETHOD_ONRECORDCREATE = "OnRecordCreate"

Definition at line 19 of file MetadataField.php.

Referenced by Resource\Create(), and CWUserFactory\CreateNewUser().

const MetadataField::UPDATEMETHOD_ONRECORDEDIT = "OnRecordEdit"

Definition at line 21 of file MetadataField.php.

const MetadataField::USERISVALUE_AND = 1

Definition at line 27 of file MetadataField.php.

const MetadataField::USERISVALUE_OR = -1

Definition at line 25 of file MetadataField.php.

const MetadataField::USERISVALUE_UNSET = 0

Definition at line 26 of file MetadataField.php.

The documentation for this class was generated from the following file:

- objects/MetadataField.php