CWIS Developer Documentation
|
Factory object for Folder class, used to retrieve and manage Folders and groups of Folders. More...
Public Member Functions | |
FolderFactory ($OwnerId=NULL) | |
Constructor for FolderFactory. | |
CreateFolder ($ItemType, $FolderName=NULL, $OwnerId=NULL) | |
Create new folder that will contain only one type of item. | |
CreateMixedFolder ($FolderName=NULL, $OwnerId=NULL) | |
Create new folder that can contain multiple types of items. | |
GetFolderCount () | |
Get total number of folders currently existing. | |
GetFolderByNormalizedName ($NormalizedName, $OwnerId=NULL) | |
GetFoldersContainingItem ($Item, $ItemType, $OwnerId=NULL, $SharedFoldersOnly=FALSE) | |
Retrieve folders containing specified item. | |
GetFolders ($ItemType=NULL, $OwnerId=NULL, $Name=NULL, $Offset=0, $Count=NULL) | |
Retrieve folders with specified name, owner, or default content type. | |
![]() | |
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 | |
![]() | |
$DB | |
$FieldId | |
Factory object for Folder class, used to retrieve and manage Folders and groups of Folders.
Definition at line 15 of file FolderFactory.php.
FolderFactory::CreateFolder | ( | $ItemType, | |
$FolderName = NULL , |
|||
$OwnerId = NULL |
|||
) |
Create new folder that will contain only one type of item.
ItemType | Type of item that folder will contain. |
FolderName | String containing name of folder. (OPTIONAL) |
OwnerId | Numerical ID of folder owner. (OPTIONAL) |
Definition at line 45 of file FolderFactory.php.
References Folder\MIXEDCONTENT.
Referenced by CreateMixedFolder().
FolderFactory::CreateMixedFolder | ( | $FolderName = NULL , |
|
$OwnerId = NULL |
|||
) |
Create new folder that can contain multiple types of items.
FolderName | String containing name of folder. (OPTIONAL) |
OwnerId | Numerical ID of folder owner. (OPTIONAL) |
Definition at line 74 of file FolderFactory.php.
References CreateFolder(), and Folder\MIXEDCONTENT.
FolderFactory::FolderFactory | ( | $OwnerId = NULL | ) |
Constructor for FolderFactory.
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\ItemFactory(), and ItemFactory\SetOrderOpsCondition().
FolderFactory::GetFolderByNormalizedName | ( | $NormalizedName, | |
$OwnerId = NULL |
|||
) |
Definition at line 99 of file FolderFactory.php.
FolderFactory::GetFolderCount | ( | ) |
Get total number of folders currently existing.
Definition at line 84 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.
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) |
OwnerId | Numerical ID of folder owner. (OPTIONAL, defaults to NULL) |
Name | String containing target folder name. (OPTIONAL, defaults to NULL) |
Offset | Zero-based offset into list of folders. (OPTIONAL) |
Count | Number of folders to retrieve beginning at specified offset. (OPTIONAL) |
Definition at line 187 of file FolderFactory.php.
References ItemFactory\GetItemIds(), and Folder\MIXEDCONTENT.
FolderFactory::GetFoldersContainingItem | ( | $Item, | |
$ItemType, | |||
$OwnerId = NULL , |
|||
$SharedFoldersOnly = FALSE |
|||
) |
Retrieve folders containing specified item.
Item | Item object (must have Id() method) or item ID. | |
int | string | $ItemType | the item type |
int | $OwnerId | optional owner ID to restrict folders to |
SharedFoldersOnly | Whether to only return shared folders. |
Definition at line 133 of file FolderFactory.php.
References Folder\MIXEDCONTENT.