ItemFactory Class Reference
Public Member Functions | |
ItemFactory ($ItemClassName, $ItemTableName, $ItemIdFieldName, $ItemNameFieldName=NULL, $FieldId=NULL, $OrderOpsAllowed=FALSE) | |
Status () | |
GetCurrentEditedItemId () | |
SetCurrentEditedItemId ($NewId) | |
ClearCurrentEditedItemId () | |
ClearCurrentEditedItem () | |
CleanOutStaleTempItems () | |
GetLastTempItemId () | |
GetNextItemId () | |
GetHighestItemId ($Condition=NULL, $IncludeTempItems=FALSE) | |
GetNextTempItemId () | |
GetItemCount ($Condition=NULL, $IncludeTempItems=FALSE) | |
GetItemIds ($Condition=NULL, $IncludeTempItems=FALSE) | |
GetLatestModificationDate ($Condition=NULL) | |
GetItem ($ItemId) | |
ItemExists ($ItemId) | |
Check that item exists with specified ID. | |
GetItemByName ($Name, $IgnoreCase=FALSE) | |
GetItemNames ($SqlCondition=NULL) | |
Retrieve item names. | |
GetItems ($SqlCondition=NULL) | |
Retrieve items. | |
GetItemsAsOptionList ($OptionListName, $SelectedItemId=NULL, $SqlCondition=NULL) | |
Retrieve items of specified type as HTML option list with item names as labels and item IDs as value attributes. | |
NameIsInUse ($Name, $IgnoreCase=FALSE) | |
Check whether item name is currently in use. | |
SearchForItemNames ($SearchString, $NumberOfResults=100, $IncludeVariants=FALSE, $UseBooleanMode=TRUE, $Offset=0) | |
GetCountForItemNames ($SearchString, $IncludeVariants=FALSE, $UseBooleanMode=TRUE) | |
AddItems ($ItemNames, $Qualifier=NULL) | |
add items with specified names | |
SetOrderOpsCondition ($Condition) | |
InsertBefore ($SourceItemOrItemId, $TargetItemOrItemId) | |
InsertAfter ($SourceItemOrItemId, $TargetItemOrItemId) | |
Prepend ($ItemOrItemId) | |
Append ($ItemOrItemId) | |
GetItemIdsInOrder ($AddStrayItemsToOrder=TRUE) | |
RemoveItemFromOrder ($ItemId) | |
Protected Attributes | |
$DB | |
$FieldId |
Detailed Description
Definition at line 15 of file ItemFactory.php.

Member Function Documentation
ItemFactory::AddItems | ( | $ | ItemNames, |
$ | Qualifier = NULL |
||
) |
add items with specified names
- Parameters:
-
ItemNames Array of item names. Leading or trailing whitespace is automatically trimmed off of the names. Qualifier Qualifier object to associate with items being added.
- Returns:
- Number of items added.
- Note:
- Only items with new names will be added.
- This method only works for item types where a new item can be created by calling the constructor with NULL, an item name, and a field ID (in that order) as parameters.
Definition at line 642 of file ItemFactory.php.
References GetItemByName().
ItemFactory::Append | ( | $ | ItemOrItemId ) |
Definition at line 726 of file ItemFactory.php.
ItemFactory::CleanOutStaleTempItems | ( | ) |
Definition at line 137 of file ItemFactory.php.
ItemFactory::ClearCurrentEditedItem | ( | ) |
Definition at line 121 of file ItemFactory.php.
References ClearCurrentEditedItemId(), and GetCurrentEditedItemId().
ItemFactory::ClearCurrentEditedItemId | ( | ) |
Definition at line 96 of file ItemFactory.php.
Referenced by ClearCurrentEditedItem().

ItemFactory::GetCountForItemNames | ( | $ | SearchString, |
$ | IncludeVariants = FALSE , |
||
$ | UseBooleanMode = TRUE |
||
) |
Definition at line 576 of file ItemFactory.php.
References $DB.
ItemFactory::GetCurrentEditedItemId | ( | ) |
Definition at line 52 of file ItemFactory.php.
References GetLastTempItemId().
Referenced by ClearCurrentEditedItem().

ItemFactory::GetHighestItemId | ( | $ | Condition = NULL , |
$ | IncludeTempItems = FALSE |
||
) |
Definition at line 191 of file ItemFactory.php.
Referenced by MetadataSchema::GetHighestFieldId(), and GetNextItemId().

ItemFactory::GetItem | ( | $ | ItemId ) |
Definition at line 321 of file ItemFactory.php.
Referenced by GetItemByName(), GetItems(), OAIServer::ProcessGetRecord(), and OAIServer::ProcessListRecords().

ItemFactory::GetItemByName | ( | $ | Name, |
$ | IgnoreCase = FALSE |
||
) |
Definition at line 339 of file ItemFactory.php.
References GetItem().
Referenced by AddItems(), and QualifierFactory::GetQualifierByName().

ItemFactory::GetItemCount | ( | $ | Condition = NULL , |
$ | IncludeTempItems = FALSE |
||
) |
Definition at line 235 of file ItemFactory.php.
Referenced by QualifierFactory::QualifierCount().

ItemFactory::GetItemIds | ( | $ | Condition = NULL , |
$ | IncludeTempItems = FALSE |
||
) |
Definition at line 285 of file ItemFactory.php.
ItemFactory::GetItemIdsInOrder | ( | $ | AddStrayItemsToOrder = TRUE ) |
Definition at line 741 of file ItemFactory.php.
ItemFactory::GetItemNames | ( | $ | SqlCondition = NULL ) |
Retrieve item names.
- Parameters:
-
SqlCondition SQL condition (w/o "WHERE") for name retrieval. (OPTIONAL)
- Returns:
- Array with item names as values and item IDs as indexes.
Definition at line 382 of file ItemFactory.php.
Referenced by GetItems(), GetItemsAsOptionList(), PrivilegeFactory::GetPrivileges(), and QualifierFactory::QualifierList().

ItemFactory::GetItems | ( | $ | SqlCondition = NULL ) |
Retrieve items.
- Parameters:
-
SqlCondition SQL condition (w/o "WHERE") for name retrieval. (OPTIONAL)
- Returns:
- Array with item objects as values and item IDs as indexes.
Definition at line 420 of file ItemFactory.php.
References $Items, GetItem(), and GetItemNames().
Referenced by OAIServer::ProcessListRecords().

ItemFactory::GetItemsAsOptionList | ( | $ | OptionListName, |
$ | SelectedItemId = NULL , |
||
$ | SqlCondition = NULL |
||
) |
Retrieve items of specified type as HTML option list with item names as labels and item IDs as value attributes.
The first element on the list will have a label of "--" and an ID of -1 to indicate no item selected.
- Parameters:
-
OptionListName Value of option list "name" attribute. SelectedItemId ID of currently-selected item. (OPTIONAL) SqlCondition SQL condition (w/o "WHERE") for item retrieval. (OPTIONAL)
- Returns:
- HTML for option list.
Definition at line 440 of file ItemFactory.php.
References GetItemNames().
ItemFactory::GetLastTempItemId | ( | ) |
Definition at line 155 of file ItemFactory.php.
Referenced by GetCurrentEditedItemId().

ItemFactory::GetLatestModificationDate | ( | $ | Condition = NULL ) |
Definition at line 311 of file ItemFactory.php.
ItemFactory::GetNextItemId | ( | ) |
Definition at line 171 of file ItemFactory.php.
References GetHighestItemId().
ItemFactory::GetNextTempItemId | ( | ) |
Definition at line 216 of file ItemFactory.php.
ItemFactory::InsertAfter | ( | $ | SourceItemOrItemId, |
$ | TargetItemOrItemId | ||
) |
Definition at line 696 of file ItemFactory.php.
ItemFactory::InsertBefore | ( | $ | SourceItemOrItemId, |
$ | TargetItemOrItemId | ||
) |
Definition at line 681 of file ItemFactory.php.
ItemFactory::ItemExists | ( | $ | ItemId ) |
Check that item exists with specified ID.
- Parameters:
-
ItemId ID of item.
Definition at line 330 of file ItemFactory.php.
ItemFactory::ItemFactory | ( | $ | ItemClassName, |
$ | ItemTableName, | ||
$ | ItemIdFieldName, | ||
$ | ItemNameFieldName = NULL , |
||
$ | FieldId = NULL , |
||
$ | OrderOpsAllowed = FALSE |
||
) |
Definition at line 20 of file ItemFactory.php.
References $FieldId, and SetOrderOpsCondition().
Referenced by SavedSearchFactory::__construct(), ClassificationFactory::ClassificationFactory(), ControlledNameFactory::ControlledNameFactory(), FileFactory::FileFactory(), MetadataSchema::MetadataSchema(), PrivilegeFactory::PrivilegeFactory(), QualifierFactory::QualifierFactory(), and ResourceFactory::ResourceFactory().

ItemFactory::NameIsInUse | ( | $ | Name, |
$ | IgnoreCase = FALSE |
||
) |
Check whether item name is currently in use.
- Parameters:
-
Name Name to check. IgnoreCase If TRUE, ignore case when checking. (Defaults to FALSE)
- Returns:
- TRUE if name is in use, otherwise FALSE.
Definition at line 471 of file ItemFactory.php.
Referenced by MetadataSchema::FieldExists(), and QualifierFactory::QualifierNameIsInUse().

ItemFactory::Prepend | ( | $ | ItemOrItemId ) |
Definition at line 711 of file ItemFactory.php.
ItemFactory::RemoveItemFromOrder | ( | $ | ItemId ) |
Definition at line 756 of file ItemFactory.php.
ItemFactory::SearchForItemNames | ( | $ | SearchString, |
$ | NumberOfResults = 100 , |
||
$ | IncludeVariants = FALSE , |
||
$ | UseBooleanMode = TRUE , |
||
$ | Offset = 0 |
||
) |
Definition at line 484 of file ItemFactory.php.
References $DB.
ItemFactory::SetCurrentEditedItemId | ( | $ | NewId ) |
Definition at line 76 of file ItemFactory.php.
ItemFactory::SetOrderOpsCondition | ( | $ | Condition ) |
Definition at line 672 of file ItemFactory.php.
Referenced by ItemFactory().

ItemFactory::Status | ( | ) |
Definition at line 49 of file ItemFactory.php.
Member Data Documentation
ItemFactory::$DB [protected] |
Definition at line 773 of file ItemFactory.php.
Referenced by GetCountForItemNames(), MetadataSchema::GetFieldNames(), ResourceFactory::GetMatchingResources(), SearchForItemNames(), and ResourceFactory::UpdateResourceCountCallback().
ItemFactory::$FieldId [protected] |
Definition at line 774 of file ItemFactory.php.
Referenced by ClassificationFactory::ClassificationFactory(), ControlledNameFactory::ControlledNameFactory(), MetadataSchema::DropField(), MetadataSchema::FieldToStdNameMapping(), FileFactory::FileFactory(), MetadataSchema::GetField(), MetadataSchema::GetFieldByName(), ResourceFactory::GetMatchingResources(), ResourceFactory::GetResourceCount(), ItemFactory(), and MetadataSchema::StdNameToFieldMapping().
The documentation for this class was generated from the following file: