dmsModifyLoaded... - Hooks

The following hooks could be used for modifying the objects loaded by DmsLoader.

Content

dmsModifyLoadedCategory

The "dmsModifyLoadedCategory" hook is triggered for modifying the categories loaded by DmsLoader. So the properties could be modified. It passes the $category (existing loaded object) and the $dbResultCategory (the database result). It expects the modified category as return value.

(since Version 2.2.0)

// config.php

$GLOBALS['TL_HOOKS']['dmsModifyLoadedCategory'][] = array('MyDmsModificationClass', 'myDmsModifyLoadedCategory');

// MyDmsModificationClass.php

class MyDmsModificationClass
{
	public function myDmsModifyLoadedCategory(\ContaoDMS\Category $category, $dbResultCategory)
	{
		// do custom modification here
		return $category;
	}
}

dmsModifyLoadedAccessRight

The "dmsModifyLoadedAccessRight" hook is triggered for modifying the access rights loaded by DmsLoader. So the properties could be modified. It passes the $accessRight (existing loaded object) and the $dbResultAccessRight (the database result). It expects the modified access right as return value.

(since Version 2.2.0)

dmsModifyLoadedDocument

The "dmsModifyLoadedDocument" hook is triggered for modifying the documents loaded by DmsLoader. So the properties could be modified. It passes the $document (existing loaded object) and the $dbResultDocument (the database result). It expects the modified access right as return value.

(since Version 2.2.0)

Last updated

Was this helpful?