Skip to content

donkeycode/propel-lockable-behavior

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LockableBehavior

Build Status

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:

propel.behavior.visibility.class = path.to.LockableBehavior

Usage

Just add the following XML tag in your schema.xml file:

<behavior name="lockable">
    <!-- Choose columns to apply -->
    <parameter name="apply_to" value="my_field, my_other_field" />
</behavior>

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

About

Allows you to mark columns edited as lock and choose forceUpdate or not

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages