CWIS Developer Documentation
|
Metadata type representing non-hierarchical controlled vocabulary values. More...
Public Member Functions | |
VariantName ($NewValue=DB_NOVALUE) | |
Get, set, or clear any variant terms for this controlled name . More... | |
FieldId ($NewValue=DB_NOVALUE) | |
Get or set the MetadataField associated with this term. More... | |
QualifierId ($NewValue=DB_NOVALUE) | |
Get or set the Qualifier associated with this term via ID. More... | |
Qualifier ($NewValue=DB_NOVALUE) | |
Get or set the Qualifier associated with this term via object. More... | |
InUse () | |
See if ControlledName is currently associated with any Resources. More... | |
GetAssociatedResources () | |
Get resourceIds associated with this ControlledName. More... | |
RemapTo ($NewNameId) | |
Change all currently associated Resources to be instead associated with another ControlledName. More... | |
UpdateLastAssigned () | |
Update the LastAssigned timestamp for this classification. More... | |
Delete ($DeleteIfHasResources=FALSE) | |
Remove ControlledName (and any accompanying associations from database. More... | |
![]() | |
__construct ($Id) | |
Constructor, used to load existing items. More... | |
Destroy () | |
Destroy item. More... | |
Delete () | |
Destroy item. More... | |
Id () | |
Get item ID. More... | |
Name ($NewValue=DB_NOVALUE) | |
Get/set name of item. More... | |
DateCreated ($NewValue=DB_NOVALUE) | |
Get/set when item was created. More... | |
CreatedBy ($NewValue=DB_NOVALUE) | |
Get/set ID of user who created the item. More... | |
DateLastModified ($NewValue=DB_NOVALUE) | |
Get/set when item was last modified. More... | |
LastModifiedBy ($NewValue=DB_NOVALUE) | |
Get/set ID of user who last modified the item. More... | |
Static Public Member Functions | |
static | Create ($Term, $FieldId) |
Create a new empty ControlledName if it's not already present. More... | |
static | ControlledNameExists ($Term, $FieldId) |
Check if there exists a controlledname with a ControlledName and FieldId same as given. More... | |
static | SearchForControlledName ($ControlledName, $FieldId) |
Check if the given controlled name already exists for a given field ID. More... | |
![]() | |
static | GetCanonicalId ($Id) |
Normalize item ID to canonical form. More... | |
static | ItemExists ($Id) |
Check whether an item exists with the specified ID. More... | |
Static Protected Member Functions | |
static | SetDatabaseAccessValues ($ClassName) |
Set the database access values (table name, ID column name, name column name) for specified class. More... | |
![]() | |
static | CreateWithValues ($Values) |
Create a new item, using specified initial database values. More... | |
static | SetDatabaseAccessValues ($ClassName) |
Set the database access values (table name, ID column name, name column name) for specified class. More... | |
Additional Inherited Members | |
![]() | |
const | NO_ITEM = -2123456789 |
ID value used to indicate no item. More... | |
![]() | |
UpdateValue ($ColumnName, $NewValue=DB_NOVALUE) | |
Convenience function to supply parameters to Database::UpdateValue(). More... | |
UpdateDateValue ($ColumnName, $NewValue=DB_NOVALUE) | |
Convenience function to supply parameters to Database::UpdateValue(), with preprocessing of new values to convert them into an SQL-compatible date format. More... | |
![]() | |
$DB | |
$Id | |
$ItemIdColumnName | |
$ItemNameColumnName | |
$ItemTableName | |
$ValueCache = array() | |
![]() | |
static | $ItemIdColumnNames |
static | $ItemNameColumnNames |
static | $ItemTableNames |
Metadata type representing non-hierarchical controlled vocabulary values.
Hierarchical controlled vocabularies should use Classification.
Definition at line 14 of file ControlledName.php.
|
static |
Check if there exists a controlledname with a ControlledName and FieldId same as given.
This method is different from ItemExists(), which does check base on Id.
string | $Term | ControlledName of the controlledname. |
string | $FieldId | ID of the MetadataField. |
Definition at line 64 of file ControlledName.php.
References Item\$DB.
Referenced by ControlledName_Test\testControlledName().
|
static |
Create a new empty ControlledName if it's not already present.
Caller should set other parameters after it's created. If a controlledname with given name and field ID already exists, this will just return that controlledname.
string | $Term | New controlled vocabulary term. |
int | $FieldId | ID of MetadataField for new term. |
Definition at line 29 of file ControlledName.php.
References Item\$DB.
Referenced by MetadataField\Drop(), ResourceFactory\ImportResourcesFromXmlFile(), Resource_Test\setUpBeforeClass(), and ControlledName_Test\testControlledName().
ControlledName::Delete | ( | $DeleteIfHasResources = FALSE | ) |
Remove ControlledName (and any accompanying associations from database.
This must be the last use of this object.
bool | $DeleteIfHasResources | Remove ControlledName even if Resources are currently associated with it. (OPTIONAL, defaults to FALSE) |
Definition at line 294 of file ControlledName.php.
References Item\$DB, Item\Destroy(), Item\Id(), and InUse().
ControlledName::FieldId | ( | $NewValue = DB_NOVALUE | ) |
Get or set the MetadataField associated with this term.
int | $NewValue | ID of new MetadataField. (OPTIONAL) |
Definition at line 132 of file ControlledName.php.
References Item\UpdateValue().
ControlledName::GetAssociatedResources | ( | ) |
Get resourceIds associated with this ControlledName.
Definition at line 228 of file ControlledName.php.
References Item\Id().
ControlledName::InUse | ( | ) |
See if ControlledName is currently associated with any Resources.
Definition at line 218 of file ControlledName.php.
References Item\Id().
Referenced by Delete().
ControlledName::Qualifier | ( | $NewValue = DB_NOVALUE | ) |
Get or set the Qualifier associated with this term via object.
Definition at line 152 of file ControlledName.php.
References DB_NOVALUE, Item\ItemExists(), and QualifierId().
ControlledName::QualifierId | ( | $NewValue = DB_NOVALUE | ) |
Get or set the Qualifier associated with this term via ID.
int | $NewValue | ID of new Qualifier. (OPTIONAL) |
Definition at line 142 of file ControlledName.php.
References Item\UpdateValue().
Referenced by Qualifier().
ControlledName::RemapTo | ( | $NewNameId | ) |
Change all currently associated Resources to be instead associated with another ControlledName.
int | $NewNameId | ID of ControlledName to remap resources to. |
Definition at line 242 of file ControlledName.php.
References Item\Id().
|
static |
Check if the given controlled name already exists for a given field ID.
string | $ControlledName | Name to search for. |
int | $FieldId | ID of field to search. |
Definition at line 200 of file ControlledName.php.
Referenced by ControlledName_Test\testControlledName().
|
staticprotected |
Set the database access values (table name, ID column name, name column name) for specified class.
This may be overridden in a child class, if different values are needed.
string | $ClassName | Class to set values for. |
Definition at line 321 of file ControlledName.php.
ControlledName::UpdateLastAssigned | ( | ) |
Update the LastAssigned timestamp for this classification.
Definition at line 282 of file ControlledName.php.
References Item\Id().
ControlledName::VariantName | ( | $NewValue = DB_NOVALUE | ) |
Get, set, or clear any variant terms for this controlled name .
string | or bool $NewValue New value for variant terms. (OPTIONAL) Pass no argument to just retrieve current variant name. Pass FALSE to unset any variant name attached. |
Definition at line 83 of file ControlledName.php.
References DB_NOVALUE, and Item\Id().