CWIS Developer Documentation
|
Factory object for Folder class, used to retrieve and manage Folders and groups of Folders. More...
Public Member Functions | |
__construct ($OwnerId=NULL) | |
Constructor for FolderFactory. More... | |
CreateFolder ($ItemType, $FolderName=NULL, $OwnerId=NULL) | |
Create new folder that will contain only one type of item. More... | |
CreateMixedFolder ($FolderName=NULL, $OwnerId=NULL) | |
Create new folder that can contain multiple types of items. More... | |
GetFolderCount () | |
Get total number of folders currently existing. More... | |
GetFolderByNormalizedName ($NormalizedName, $OwnerId=NULL) | |
Retrieve folder with specified normalized name (as generated by Folder::NormalizeFolderName() method). More... | |
GetFoldersContainingItem ($Item, $ItemType, $OwnerId=NULL, $SharedFoldersOnly=FALSE) | |
Retrieve folders containing specified item. More... | |
GetFolders ($ItemType=NULL, $OwnerId=NULL, $Name=NULL, $Offset=0, $Count=NULL) | |
Retrieve folders with specified name, owner, or default content type. More... | |
![]() | |
__construct ($ItemClassName, $ItemTableName, $ItemIdColumnName, $ItemNameColumnName=NULL, $OrderOpsAllowed=FALSE, $SqlCondition=NULL) | |
Class constructor. More... | |
GetItemClassName () | |
Get class name of items manipulated by factory. More... | |
CleanOutStaleTempItems ($MinutesUntilStale=10080) | |
Clear out (call the Delete() method) for any temp items more than specified number of minutes old. More... | |
GetNextItemId () | |
Retrieve next available (non-temp) item ID. More... | |
GetHighestItemId ($IgnoreSqlCondition=FALSE) | |
Retrieve highest item ID in use. More... | |
GetNextTempItemId () | |
Return next available temporary item ID. More... | |
GetItemCount ($Condition=NULL, $IncludeTempItems=FALSE) | |
Get count of items. More... | |
GetItemIds ($Condition=NULL, $IncludeTempItems=FALSE, $SortField=NULL, $SortAscending=TRUE) | |
Return array of item IDs. More... | |
GetLatestModificationDate ($Condition=NULL) | |
Get newest modification date (based on values in "DateLastModified" column in database table). More... | |
GetItem ($ItemId) | |
Retrieve item by item ID. More... | |
ItemExists ($ItemId, $IgnoreSqlCondition=FALSE) | |
Check that item exists with specified ID. More... | |
GetItemByName ($Name, $IgnoreCase=FALSE) | |
Retrieve item by name. More... | |
GetItemIdByName ($Name, $IgnoreCase=FALSE) | |
Retrieve item ID by name. More... | |
GetItemIdsByNames ($Names) | |
Look up IDs for specified names. More... | |
GetItemNames ($SqlCondition=NULL) | |
Retrieve item names. More... | |
GetItems ($SqlCondition=NULL) | |
Retrieve items. More... | |
GetItemsAsOptionList ($OptionListName, $SelectedItemId=NULL, $SqlCondition=NULL, $DisplaySize=1, $SubmitOnChange=FALSE, $Disabled=FALSE) | |
Retrieve items of specified type as HTML option list with item names as labels and item IDs as value attributes. More... | |
NameIsInUse ($Name, $IgnoreCase=FALSE) | |
Check whether item name is currently in use. More... | |
SearchForItemNames ($SearchString, $NumberOfResults=100, $IncludeVariants=FALSE, $UseBooleanMode=TRUE, $Offset=0, $IdExclusions=array(), $NameExclusions=array()) | |
Retrieve items with names matching search string. More... | |
GetCountForItemNames ($SearchString, $IncludeVariants=FALSE, $UseBooleanMode=TRUE, $IdExclusions=array(), $NameExclusions=array()) | |
Retrieve count of items with names matching search string. More... | |
ReindexByItemIds ($Array) | |
Reindex supplied associative array, by replacing item names with item IDs. More... | |
CachingEnabled ($NewValue=NULL) | |
Enable/disable caching of item information. More... | |
ClearCaches () | |
Clear item information caches. More... | |
SetOrderOpsCondition ($Condition) | |
Set SQL condition (added to WHERE clause) used to select items for ordering operations. More... | |
InsertBefore ($TargetItem, $NewItem) | |
Insert item into order before specified item. More... | |
InsertAfter ($TargetItem, $NewItem) | |
Insert item into order after specified item. More... | |
Prepend ($Item) | |
Add item to beginning of order. More... | |
Append ($Item) | |
Add item to end of order. More... | |
GetItemIdsInOrder () | |
Retrieve list of item IDs in order. More... | |
RemoveItemFromOrder ($ItemId) | |
Remove item from existing order. More... | |
Additional Inherited Members | |
![]() | |
$DB | |
Factory object for Folder class, used to retrieve and manage Folders and groups of Folders.
Definition at line 14 of file FolderFactory.php.
FolderFactory::__construct | ( | $OwnerId = NULL | ) |
Constructor for FolderFactory.
int | $OwnerId | ID of owner of folders to be manipulated by factory. If specified then all operations pertain only to folders with the specified owner. (OPTIONAL) |
Definition at line 25 of file FolderFactory.php.
References ItemFactory\SetOrderOpsCondition().
FolderFactory::CreateFolder | ( | $ItemType, | |
$FolderName = NULL , |
|||
$OwnerId = NULL |
|||
) |
Create new folder that will contain only one type of item.
mixed | $ItemType | Type of item that folder will contain. |
string | $FolderName | String containing name of folder. (OPTIONAL) |
int | $OwnerId | Numerical ID of folder owner. (OPTIONAL) |
Definition at line 45 of file FolderFactory.php.
References Folder\GetItemTypeId(), and Folder\MIXEDCONTENT.
Referenced by CreateMixedFolder().
FolderFactory::CreateMixedFolder | ( | $FolderName = NULL , |
|
$OwnerId = NULL |
|||
) |
Create new folder that can contain multiple types of items.
(This is a separate operation because mixed item types incurs execution overhead.)
string | $FolderName | String containing name of folder. (OPTIONAL) |
int | $OwnerId | Numerical ID of folder owner. (OPTIONAL) |
Definition at line 75 of file FolderFactory.php.
References CreateFolder(), and Folder\MIXEDCONTENT.
FolderFactory::GetFolderByNormalizedName | ( | $NormalizedName, | |
$OwnerId = NULL |
|||
) |
Retrieve folder with specified normalized name (as generated by Folder::NormalizeFolderName() method).
string | $NormalizedName | Normalized folder name. |
int | $OwnerId | ID of folder owner. (OPTIONAL) |
Definition at line 100 of file FolderFactory.php.
FolderFactory::GetFolderCount | ( | ) |
Get total number of folders currently existing.
Definition at line 85 of file FolderFactory.php.
References ItemFactory\GetItemCount().
FolderFactory::GetFolders | ( | $ItemType = NULL , |
|
$OwnerId = NULL , |
|||
$Name = NULL , |
|||
$Offset = 0 , |
|||
$Count = NULL |
|||
) |
Retrieve folders with specified name, owner, or default content type.
If no parameters are specified, all existing folders are returned. If no owner ID parameter is supplied and an owner ID was specified for FolderFactory::FolderFactory(), then that owner ID is used.
mixed | $ItemType | String containing type of item to search for as default content type of folder. To search for only mixed-content-type folders specify Folder::MIXEDCONTENT. (OPTIONAL, defaults to NULL) |
int | $OwnerId | Numerical ID of folder owner. (OPTIONAL, defaults to NULL) |
string | $Name | String containing target folder name. (OPTIONAL, defaults to NULL) |
int | $Offset | Zero-based offset into list of folders. (OPTIONAL) |
int | $Count | Number of folders to retrieve beginning at specified offset. (OPTIONAL) |
Definition at line 190 of file FolderFactory.php.
References ItemFactory\GetItemIds(), Folder\GetItemTypeId(), and Folder\MIXEDCONTENT.
FolderFactory::GetFoldersContainingItem | ( | $Item, | |
$ItemType, | |||
$OwnerId = NULL , |
|||
$SharedFoldersOnly = FALSE |
|||
) |
Retrieve folders containing specified item.
object | $Item | Object (must have Id() method) or item ID. |
mixed | $ItemType | The item type. |
int | $OwnerId | Optional owner ID to restrict folders to. |
bool | $SharedFoldersOnly | Whether to only return shared folders. |
Definition at line 134 of file FolderFactory.php.
References Folder\GetItemTypeId(), and Folder\MIXEDCONTENT.