com\setasign\SetaSite\Page

PageLocks

File: /SetaSite/src/Page/PageLocks.php

Class hierarchy

Summary

Properties


Methods

forceRemoveLock()

public PageLocks::forceRemoveLock (
int $pageId,
string $language,
?int $userId = null
): void

This method will remove the lock of $pageId.

If a userId is given it will check whether the active lock is by that user. If not a PageLockException is thrown. It will not be checked whether the lock is allowed to be removed.

Parameters
$pageId: int
 
$language: string
 
$userId: ?int
 
Exceptions

Throws PageLockException

getAllLocks()

public PageLocks::getAllLocks (
?array<int, array{id: int, language: string}> $pages = null
): array
Parameters
$pages: ?array<int, array{id: int, language: string}>

If given the select will be filtered by this ids.

getLockValidInfo()

public PageLocks::getLockValidInfo (
int $pageId,
string $language,
int $userId,
\com\setasign\SetaSite\User\Users $users,
int $timeout
): ?array
Parameters
$pageId: int
 
$language: string
 
$userId: int
 
$users: \com\setasign\SetaSite\User\Users
 
$timeout: int
 
Return Values

null if no lock exist

hasLock()

public PageLocks::hasLock (
int $pageId,
string $language,
?int $userId = null
): bool
Parameters
$pageId: int
 
$language: string
 
$userId: ?int
 

isEditMode()

public PageLocks::isEditMode (
int $pageId,
string $language,
int $userId
): bool
Parameters
$pageId: int
 
$language: string
 
$userId: int
 

isLockedByUser()

public PageLocks::isLockedByUser (
int $pageId,
string $language,
?int $userId = null
): bool

Checks whether there is an lock by user $userId on page $pageId.

Doesn't check the validity of the user

Parameters
$pageId: int
 
$language: string
 
$userId: ?int
 

removeLock()

public PageLocks::removeLock (
\com\setasign\SetaSite\User\Users $users,
int $timeout,
int $pageId,
string $language,
?int $activeUserId = null
): void
Parameters
$users: \com\setasign\SetaSite\User\Users
 
$timeout: int
 
$pageId: int
 
$language: string
 
$activeUserId: ?int
 
Exceptions

Throws PageLockException

setLock()

public PageLocks::setLock (
int $pageId,
string $language,
int $userId
): void
Parameters
$pageId: int
 
$language: string
 
$userId: int
 
Exceptions

Throws \com\setasign\SetaFramework\Exception

Throws PageLockException