Click or drag to resize

IAssetManagerRemoveAssetsAndFolders Method


Removes multiple Assets and Asset Folders given an array of asset IDs.

Namespace: Ingeniux.CMS
Assembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
Syntax
string[] RemoveAssetsAndFolders(
	string[] assetIds,
	out string[] assetItemsWithRefs,
	bool permenant = false
)

Parameters

assetIds  String
IDs of the Assets and Asset Folders to remove.
assetItemsWithRefs  String
Outputs list of asset Ids that are referenced by pages
permenant  Boolean  (Optional)
If true, completely removes the Assets and Asset Folders from the CMS. Otherwise, they are placed in the Asset Recycle Folder.

Return Value

String
An array of all successfully removed asset item IDs.
Remarks

If the Assets/Asset Folders are not under the Asset Recycle Folder, they will be moved to the Recycle Folder. If they are already under the Recycle Folder, they will be permenantly purged.

Call this method rather than calling RemoveAsset(String, Boolean) and RemoveAssetFolder(String, Boolean) seperately. This will query dependencies more efficiently and prevent "dependencies out of deletion range errors" if folders contain items being referenced by assets also getting deleted.

Two events are fired during execution of this method: BeforeAssetDelete and AfterAssetDelete.

See Also