定制 donkeycode/propel-lockable-behavior 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

donkeycode/propel-lockable-behavior

Composer 安装命令:

composer require donkeycode/propel-lockable-behavior

包简介

Propel behavior that helps you to set a lock per fields

README 文档

README

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

统计信息

  • 总下载量: 14.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-06