\FrontendLockable
Apply this extension to a page type to allow it to be 'locked'.
- Author: Marcus Nyeholt <marcus@silverstripe.com.au>
Synopsis
class FrontendLockable
extends DataExtension
{
- // members
- public static integer $lock_time = 120;
- public static array $db = ;
- // methods
- public void updateCMSFields()
- public void getLockTime()
- public void getLockUpdater()
- public void onBeforeWrite()
- public void lock()
- public array getEditingLocks()
- public void userHasLocks()
Hierarchy
Extends
- DataExtension
Members
public
- $db
- $lock_time
—
int
lock pages for 1 minute at a time by default This value is in seconds
Methods
public
- getEditingLocks() — Retrieve the details about the locked state of the current page.
- getLockTime()
- getLockUpdater() — Return HTML needed to persist the lock from the frontend of the website
- lock() — Lock the page for the current user
- onBeforeWrite() — Before saving, make sure to set a default lock time
- updateCMSFields()
- userHasLocks() — Indicates whether the member has the lock on the current object