ItemFactory Class Reference

Public Member Functions

 ItemFactory ($ItemClassName, $ItemTableName, $ItemIdFieldName, $ItemNameFieldName=NULL, $FieldId=NULL, $OrderOpsAllowed=FALSE)
 Status ()
 GetCurrentEditedItemId ()
 SetCurrentEditedItemId ($NewId)
 ClearCurrentEditedItemId ()
 ClearCurrentEditedItem ()
 CleanOutStaleTempItems ($MinutesUntilStale=10080)
 Clear out (call the Delete() method) for any temp items more than specified number of minutes old.
 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, $DisplaySize=1)
 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

List of all members.


Detailed Description

Definition at line 15 of file ItemFactory.php.

Inheritance diagram for ItemFactory:

Member Function Documentation

ItemFactory::AddItems ( ItemNames,
Qualifier = NULL 
)

add items with specified names

Parameters:
ItemNamesArray of item names. Leading or trailing whitespace is automatically trimmed off of the names.
QualifierQualifier 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 670 of file ItemFactory.php.

References GetItemByName().

ItemFactory::Append ( ItemOrItemId )

Definition at line 754 of file ItemFactory.php.

ItemFactory::CleanOutStaleTempItems ( MinutesUntilStale = 10080 )

Clear out (call the Delete() method) for any temp items more than specified number of minutes old.

Parameters:
MinutesUntilStaleNumber of minutes before items are considered stale. (OPTIONAL - defaults to 7 days)
Returns:
Number of stale items deleted.

Definition at line 143 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().

Here is the caller graph for this function:

ItemFactory::GetCountForItemNames ( SearchString,
IncludeVariants = FALSE,
UseBooleanMode = TRUE 
)

Definition at line 604 of file ItemFactory.php.

References $DB.

ItemFactory::GetCurrentEditedItemId (  )

Definition at line 52 of file ItemFactory.php.

References GetLastTempItemId().

Referenced by ClearCurrentEditedItem().

Here is the caller graph for this function:

ItemFactory::GetHighestItemId ( Condition = NULL,
IncludeTempItems = FALSE 
)

Definition at line 202 of file ItemFactory.php.

Referenced by MetadataSchema::GetHighestFieldId(), and GetNextItemId().

Here is the caller graph for this function:

ItemFactory::GetItem ( ItemId )

Definition at line 332 of file ItemFactory.php.

Referenced by GetItemByName(), GetItems(), OAIServer::ProcessGetRecord(), and OAIServer::ProcessListRecords().

Here is the caller graph for this function:

ItemFactory::GetItemByName ( Name,
IgnoreCase = FALSE 
)

Definition at line 350 of file ItemFactory.php.

References GetItem().

Referenced by AddItems(), and QualifierFactory::GetQualifierByName().

Here is the caller graph for this function:

ItemFactory::GetItemCount ( Condition = NULL,
IncludeTempItems = FALSE 
)

Definition at line 246 of file ItemFactory.php.

Referenced by QualifierFactory::QualifierCount().

Here is the caller graph for this function:

ItemFactory::GetItemIds ( Condition = NULL,
IncludeTempItems = FALSE 
)

Definition at line 296 of file ItemFactory.php.

ItemFactory::GetItemIdsInOrder ( AddStrayItemsToOrder = TRUE )

Definition at line 769 of file ItemFactory.php.

ItemFactory::GetItemNames ( SqlCondition = NULL )

Retrieve item names.

Parameters:
SqlConditionSQL condition (w/o "WHERE") for name retrieval. (OPTIONAL)
Returns:
Array with item names as values and item IDs as indexes.

Reimplemented in PrivilegeFactory.

Definition at line 393 of file ItemFactory.php.

Referenced by GetItems(), GetItemsAsOptionList(), and QualifierFactory::QualifierList().

Here is the caller graph for this function:

ItemFactory::GetItems ( SqlCondition = NULL )

Retrieve items.

Parameters:
SqlConditionSQL condition (w/o "WHERE") for name retrieval. (OPTIONAL)
Returns:
Array with item objects as values and item IDs as indexes.

Definition at line 431 of file ItemFactory.php.

References $Items, GetItem(), and GetItemNames().

Referenced by OAIServer::ProcessListRecords().

Here is the caller graph for this function:

ItemFactory::GetItemsAsOptionList ( OptionListName,
SelectedItemId = NULL,
SqlCondition = NULL,
DisplaySize = 1 
)

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:
OptionListNameValue of option list "name" attribute.
SelectedItemIdID of currently-selected item or array of IDs of currently-selected items. (OPTIONAL)
SqlConditionSQL condition (w/o "WHERE") for item retrieval. (OPTIONAL)
DisplaySizeDisplay length of option list. (OPTIONAL)
Returns:
HTML for option list.

Definition at line 453 of file ItemFactory.php.

References GetItemNames().

ItemFactory::GetLastTempItemId (  )

Definition at line 166 of file ItemFactory.php.

Referenced by GetCurrentEditedItemId().

Here is the caller graph for this function:

ItemFactory::GetLatestModificationDate ( Condition = NULL )

Definition at line 322 of file ItemFactory.php.

ItemFactory::GetNextItemId (  )

Definition at line 182 of file ItemFactory.php.

References GetHighestItemId().

ItemFactory::GetNextTempItemId (  )

Definition at line 227 of file ItemFactory.php.

ItemFactory::InsertAfter ( SourceItemOrItemId,
TargetItemOrItemId 
)

Definition at line 724 of file ItemFactory.php.

ItemFactory::InsertBefore ( SourceItemOrItemId,
TargetItemOrItemId 
)

Definition at line 709 of file ItemFactory.php.

ItemFactory::ItemExists ( ItemId )

Check that item exists with specified ID.

Parameters:
ItemIdID of item.

Definition at line 341 of file ItemFactory.php.

ItemFactory::ItemFactory ( ItemClassName,
ItemTableName,
ItemIdFieldName,
ItemNameFieldName = NULL,
FieldId = NULL,
OrderOpsAllowed = FALSE 
)
ItemFactory::NameIsInUse ( Name,
IgnoreCase = FALSE 
)

Check whether item name is currently in use.

Parameters:
NameName to check.
IgnoreCaseIf TRUE, ignore case when checking. (Defaults to FALSE)
Returns:
TRUE if name is in use, otherwise FALSE.

Definition at line 499 of file ItemFactory.php.

Referenced by MetadataSchema::FieldExists(), and QualifierFactory::QualifierNameIsInUse().

Here is the caller graph for this function:

ItemFactory::Prepend ( ItemOrItemId )

Definition at line 739 of file ItemFactory.php.

ItemFactory::RemoveItemFromOrder ( ItemId )

Definition at line 784 of file ItemFactory.php.

ItemFactory::SearchForItemNames ( SearchString,
NumberOfResults = 100,
IncludeVariants = FALSE,
UseBooleanMode = TRUE,
Offset = 0 
)

Definition at line 512 of file ItemFactory.php.

References $DB.

ItemFactory::SetCurrentEditedItemId ( NewId )

Definition at line 76 of file ItemFactory.php.

ItemFactory::SetOrderOpsCondition ( Condition )

Definition at line 700 of file ItemFactory.php.

Referenced by ItemFactory().

Here is the caller graph for this function:

ItemFactory::Status (  )

Definition at line 49 of file ItemFactory.php.


Member Data Documentation


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