https://github.com/donkeycode/propel-lockable-behavior
Allows you to mark columns edited as lock and choose forceUpdate or not
https://github.com/donkeycode/propel-lockable-behavior
Last synced: about 2 months ago
JSON representation
Allows you to mark columns edited as lock and choose forceUpdate or not
- Host: GitHub
- URL: https://github.com/donkeycode/propel-lockable-behavior
- Owner: donkeycode
- Created: 2015-08-06T09:56:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-02T13:44:00.000Z (over 10 years ago)
- Last Synced: 2025-02-12T11:45:58.626Z (11 months ago)
- Language: PHP
- Size: 113 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LockableBehavior
[](https://travis-ci.org/donkeycode/propel-lockable-behavior)
The **LockableBehavior** behavior allows you to mark columns edited and choose forceUpdate or not.
Installation
------------
Cherry-pick the `LockableBehavior.php` file is `src/`, put it somewhere,
then add the following line to your `propel.ini` or `build.properties` configuration file:
``` ini
propel.behavior.visibility.class = path.to.LockableBehavior
```
Usage
-----
Just add the following XML tag in your `schema.xml` file:
``` xml
```
The **lockable** behavior requires four parameters to work:
* `apply_to`: the list of column to apply the visibility behavior
## In php :
* `$post->activateLocker()` set true to locker fields at `preSave`
* `$post->activateLockCheck()` revert locked fields at `preSave` to only persist not locked fields