ILockManager
extends
ILockProvider
in
Manage app integrations with the files_lock app and collaborative editors.
This public API exposes locking operations to apps and allows a lock provider from files_lock to be registered. The actual locking implementation remains in the provider and the DAV plugin of the files_lock app.
Tags
Table of Contents
Methods
- getLockInScope() : LockContext|null
- Get the lock context currently active in this scope.
- getLocks() : array<string|int, mixed>
- isLockProviderAvailable() : bool
- Check whether a lock provider is currently available.
- lock() : ILock
- registerLazyLockProvider() : void
- Register a lock provider class for lazy resolution from the server container.
- registerLockProvider() : void
- Register the lock provider implementation.
- runInScope() : void
- Run a callback within the scope of the given lock context.
- unlock() : void
Methods
getLockInScope()
Get the lock context currently active in this scope.
public
getLockInScope() : LockContext|null
Returns null if no lock scope is active.
Tags
Return values
LockContext|nullgetLocks()
public
getLocks(int $fileId) : array<string|int, mixed>
Parameters
- $fileId : int
Tags
Return values
array<string|int, mixed>isLockProviderAvailable()
Check whether a lock provider is currently available.
public
isLockProviderAvailable() : bool
If a provider class was registered lazily, this may attempt to resolve it.
Tags
Return values
boollock()
public
lock(LockContext $lockInfo) : ILock
Parameters
- $lockInfo : LockContext
Tags
Return values
ILockregisterLazyLockProvider()
Register a lock provider class for lazy resolution from the server container.
public
registerLazyLockProvider(string $lockProviderClass) : void
Parameters
- $lockProviderClass : string
Tags
registerLockProvider()
Register the lock provider implementation.
public
registerLockProvider(ILockProvider $lockProvider) : void
Use registerLazyLockProvider
Parameters
- $lockProvider : ILockProvider
Tags
runInScope()
Run a callback within the scope of the given lock context.
public
runInScope(LockContext $lock, callable $callback) : void
The callback is also executed if no lock provider is available.
Parameters
- $lock : LockContext
- $callback : callable
Tags
unlock()
public
unlock(LockContext $lockInfo) : void
Parameters
- $lockInfo : LockContext