Jump to main content Jump to doc navigation

modX.checkForLocks

Other versions: 3.x — Found a problem? Please edit this page or report an issue.

modX::checkForLocks

Checks for locking on a page. A page is "locked" if another user is already viewing it. This prevents collisions.

Syntax

API Doc: http://api.modx.com/revolution/2.2/db_core_model_modx_modx.class.html#%5CmodX::checkForLocks()

void checkForLocks (integer $id, string $action, string $type)

Example

Check for locks on the edit_chunk action.

if ($modx->checkForLocks($modx->getLoginUserID(),'edit_chunk','edit');

See Also