smagEntityLockingPlugin - 1.0.0
Your name here
You are currently browsing
the website for symfony 1
Your name here
Locks Objects by Route. If someone edits an Object no other user can access the route with the same ID to edit the Object too. Users will be informed about wich user locked the Object and since when.
A logout or change of the Page will free the locked object
|Your name here||lead||se.lucitrap <<ta>> onanga.tnecniv|
The goal of the Plugin is to provide locking mechanisms for single Objects. E.q. you have a number of editors for Article and only one at a time should edit this article then this Plugin will help you to achive this.
enable Plugin in app.yml
all: locking: routes_register: true enabled: true
both are enabled by default bit you can disable for testing for example
enable filter configuration
entity_locking: class: SmagEntityLockingFilter enabled: <?php echo sfConfig::get('app_locking_enabled') && in_array('locking',sfConfig::get('sf_enabled_modules')) ? "true\n" : "false\n" ?>
this enables the filter which checks for a living lock.
configure what to lock
# locking configuration example locking: # needed for resetting all locks by this user logout_route: logout # the time a lock lasts in seconds lock_time: 1800 #locked routes routes: article_edit: ~
Now if someone calls /article/1/edit and someone allready is on this page the user is informed about the existing lock, but can still edit other articles.
To disable locking after the timeout include on the edit pages the component