CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

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

Public Member Functions | List of all members
ResourceFactory Class Reference
Inheritance diagram for ResourceFactory:
[legend]
Collaboration diagram for ResourceFactory:
[legend]

## Public Member Functions
| ResourceFactory ()
| DuplicateResource ($ResourceId)
| ClearQualifier ($ObjectOrId, $NewObjectOrId=NULL)
| GetRatedResourceCount ()
| GetRatedResourceUserCount ()
| GetRecentlyReleasedResources ($Count=10, $Offset=0, $MaxDaysToGoBack=90)
| GetResourceIdsSortedBy ($FieldName, $Ascending=TRUE, $Limit=NULL)
| GetTimestampOfLastResourceModification ($OnlyReleasedResources=TRUE)
| GetPossibleFieldNames ()
| GetMatchingResources ($ValuesToMatch)
| GetResourceCount ($FieldId, $Value, $CountType="All")
| GetReleasedResourceTotal ()
| Get the total number of released resources in the collection.
| GetResourceTotal ()
| Get the total number of resources in the collection, even if they are not released.
| QueueResourceCountUpdate ()
| UpdateResourceCountCallback ()
Public Member Functions inherited from ItemFactory
| 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, $SubmitOnChange=FALSE)
| 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
| AddItem ($ItemName, $AdditionalValues=NULL)
| Add new item.
| DeleteItem ($ItemId)
| Delete item.
| SetOrderOpsCondition ($Condition)
| InsertBefore ($SourceItemOrItemId, $TargetItemOrItemId)
| InsertAfter ($SourceItemOrItemId, $TargetItemOrItemId)
| Prepend ($ItemOrItemId)
| Append ($ItemOrItemId)
| GetItemIdsInOrder ($AddStrayItemsToOrder=TRUE)
| RemoveItemFromOrder ($ItemId)

## Additional Inherited Members
Protected Attributes inherited from ItemFactory
| $DB
| $FieldId

## Detailed Description

Definition at line 19 of file ResourceFactory.php.

## Member Function Documentation

ResourceFactory::ClearQualifier | ( |  | $ObjectOrId,
|  |  | $NewObjectOrId = `NULL`
| ) |  |

Definition at line 67 of file ResourceFactory.php.

ResourceFactory::DuplicateResource | ( |  | $ResourceId | ) |

Definition at line 31 of file ResourceFactory.php.

ResourceFactory::GetMatchingResources | ( |  | $ValuesToMatch | ) |

Definition at line 272 of file ResourceFactory.php.

References ItemFactory\$FieldId, MetadataSchema\MDFTYPE_DATE, MetadataSchema\MDFTYPE_FLAG, MetadataSchema\MDFTYPE_NUMBER, MetadataSchema\MDFTYPE_PARAGRAPH, MetadataSchema\MDFTYPE_POINT, MetadataSchema\MDFTYPE_TEXT, MetadataSchema\MDFTYPE_TIMESTAMP, and MetadataSchema\MDFTYPE_URL.

ResourceFactory::GetPossibleFieldNames | ( |  | ) |

Definition at line 255 of file ResourceFactory.php.

ResourceFactory::GetRatedResourceCount | ( |  | ) |

Definition at line 118 of file ResourceFactory.php.

ResourceFactory::GetRatedResourceUserCount | ( |  | ) |

Definition at line 127 of file ResourceFactory.php.

ResourceFactory::GetRecentlyReleasedResources | ( |  | $Count = `10`,
|  |  | $Offset = `0`,
|  |  | $MaxDaysToGoBack = `90`
| ) |  |

Definition at line 136 of file ResourceFactory.php.

ResourceFactory::GetReleasedResourceTotal | ( |  | ) |

Get the total number of released resources in the collection.

Returns
  int the total number of released resources

Definition at line 361 of file ResourceFactory.php.

ResourceFactory::GetResourceCount | ( |  | $FieldId,
|  |  | $Value,
|  |  | $CountType = `"All"`
| ) |  |

Definition at line 322 of file ResourceFactory.php.

References ItemFactory\$FieldId, MetadataSchema\MDFTYPE_CONTROLLEDNAME, and MetadataSchema\MDFTYPE_OPTION.

ResourceFactory::GetResourceIdsSortedBy | ( |  | $FieldName,
|  |  | $Ascending = `TRUE`,
|  |  | $Limit = `NULL`
| ) |  |

Definition at line 165 of file ResourceFactory.php.

References MetadataSchema\MDFTYPE_DATE, MetadataSchema\MDFTYPE_NUMBER, MetadataSchema\MDFTYPE_PARAGRAPH, MetadataSchema\MDFTYPE_TEXT, MetadataSchema\MDFTYPE_TIMESTAMP, and MetadataSchema\MDFTYPE_URL.

ResourceFactory::GetResourceTotal | ( |  | ) |

Get the total number of resources in the collection, even if they are not released.

Returns
  int the total number of resources

Definition at line 374 of file ResourceFactory.php.

ResourceFactory::GetTimestampOfLastResourceModification | ( |  | $OnlyReleasedResources = `TRUE` | ) |

Definition at line 245 of file ResourceFactory.php.

ResourceFactory::QueueResourceCountUpdate | ( |  | ) |

Definition at line 382 of file ResourceFactory.php.

ResourceFactory::ResourceFactory | ( |  | ) |

Definition at line 24 of file ResourceFactory.php.

References ItemFactory\ItemFactory().

ResourceFactory::UpdateResourceCountCallback | ( |  | ) |

Definition at line 395 of file ResourceFactory.php.

References ItemFactory\$DB.

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

- objects/ResourceFactory.php