Public Member Functions | |
ControlledName ($NameId, $Name=NULL, $FieldId=NULL, $QualifierId="NULL", $VariantName=NULL) | |
Class constructor. | |
Status () | |
Check success of constructor. | |
Id () | |
Get ID. | |
Name ($NewValue=DB_NOVALUE) | |
Get or set the controlled vocabulary term. | |
VariantName ($NewValue=DB_NOVALUE) | |
Get or set any variant terms for this controlled name . | |
FieldId ($NewValue=DB_NOVALUE) | |
Get or set the MetadataField associated with this term. | |
QualifierId ($NewValue=DB_NOVALUE) | |
Get or set the Qualifier associated with this term via ID. | |
Variant ($NewValue=DB_NOVALUE) | |
Get or set ??? | |
Qualifier ($NewValue=DB_NOVALUE) | |
Get or set the Qualifier associated with this term via object. | |
InUse () | |
See if ControlledName is currently associated with any Resources. | |
RemapTo ($NewNameId) | |
Change all currently associated Resources to be instead associated with another ControlledName. | |
Delete ($DeleteIfHasResources=FALSE) | |
Remove ControlledName (and any accompanying associations from database. | |
Public Attributes | |
Status Codes (set by constructor and retrieved via Status()) | |
const | STATUS_OK = 0 |
Successful execution. | |
const | STATUS_INVALID_ID = 1 |
No ControlledName exists with specified ID. | |
const | STATUS_EXISTS = 2 |
ControlledName already exists with this term. |
Hierarchical controlled vocabularies should use Classification.
Definition at line 15 of file ControlledName.php.
ControlledName::ControlledName | ( | $ | NameId, | |
$ | Name = NULL , |
|||
$ | FieldId = NULL , |
|||
$ | QualifierId = "NULL" , |
|||
$ | VariantName = NULL | |||
) |
Class constructor.
This can be used both to access an existing controlled vocabulary term or to add a new term. For existing terms pass in just the ControlledName ID. To create a new term pass in NULL for the ID, and specify the term, the metadata field ID, and the qualifier ID (if any) and variant name (if any).
NameId | ControlledName ID (NULL if creating new). | |
Name | New controlled vocabulary term. (OPTIONAL) | |
FieldId | ID of MetadataField for new term. (OPTIONAL) | |
QualifierId | ID of Qualifier for new term (if any). (OPTIONAL) | |
VariantName | Variant names for new term (if any). (OPTIONAL) |
Definition at line 40 of file ControlledName.php.
References Id().
ControlledName::Delete | ( | $ | DeleteIfHasResources = FALSE |
) |
Remove ControlledName (and any accompanying associations from database.
This must be the last use of this object.
DeleteIfHasResources | Remove ControlledName even if Resources are currently associated with it. (OPTIONAL, defaults to FALSE) |
Definition at line 245 of file ControlledName.php.
ControlledName::FieldId | ( | $ | NewValue = DB_NOVALUE |
) |
Get or set the MetadataField associated with this term.
NewValue | ID of new MetadataField. (OPTIONAL) |
Definition at line 153 of file ControlledName.php.
ControlledName::Id | ( | ) |
Get ID.
Definition at line 130 of file ControlledName.php.
Referenced by ControlledName(), Delete(), InUse(), and RemapTo().
ControlledName::InUse | ( | ) |
See if ControlledName is currently associated with any Resources.
Definition at line 222 of file ControlledName.php.
References Id().
Referenced by Delete().
ControlledName::Name | ( | $ | NewValue = DB_NOVALUE |
) |
Get or set the controlled vocabulary term.
NewValue | New value for term. (OPTIONAL) |
Definition at line 137 of file ControlledName.php.
ControlledName::Qualifier | ( | $ | NewValue = DB_NOVALUE |
) |
Get or set the Qualifier associated with this term via object.
NewValue | New Qualifier. (OPTIONAL) |
Definition at line 177 of file ControlledName.php.
References QualifierId().
ControlledName::QualifierId | ( | $ | NewValue = DB_NOVALUE |
) |
Get or set the Qualifier associated with this term via ID.
NewValue | ID of new Qualifier. (OPTIONAL) |
Definition at line 161 of file ControlledName.php.
Referenced by Qualifier().
ControlledName::RemapTo | ( | $ | NewNameId | ) |
Change all currently associated Resources to be instead associated with another ControlledName.
NewNameId | ID of ControlledName to remap resources to. |
Definition at line 233 of file ControlledName.php.
References Id().
ControlledName::Status | ( | ) |
Check success of constructor.
Definition at line 124 of file ControlledName.php.
ControlledName::Variant | ( | $ | NewValue = DB_NOVALUE |
) |
Get or set ???
NewValue | New value for ???. (OPTIONAL) |
Definition at line 169 of file ControlledName.php.
References VariantName().
ControlledName::VariantName | ( | $ | NewValue = DB_NOVALUE |
) |
Get or set any variant terms for this controlled name .
NewValue | New value for variant terms. (OPTIONAL) |
Definition at line 145 of file ControlledName.php.
Referenced by Variant().
const ControlledName::STATUS_EXISTS = 2 |
const ControlledName::STATUS_INVALID_ID = 1 |
const ControlledName::STATUS_OK = 0 |