Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Symfony plugin for Propel 1.5 to autofill created_by, updated_by and deleted_by columns

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 config
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 package.xml.tmpl
README.md

WARNING ! Since the versionable behavior was introduced in Propel 1.6 I'm not sure if I will maintain this plugin anymore.

This symfony plugin allows to track the author of a creation, modification or deletion of a Propel model object.

It is only compatible with Propel-1.5.x

Install

Via symfony

symfony plugin:install sfPropelActAsBlameableBehaviorPlugin

Manually

git clone git://github.com/ArnaudD/sfPropelActAsBlameableBehaviorPlugin.git

Declare the behavior in your 'config/propel.ini' :

; sfPropelActAsBlameableBehaviorPlugin
propel.behavior.blameable.class = plugins.sfPropelActAsBlameableBehaviorPlugin.lib.behavior.SfPropelBehaviorBlameable

Usage

Add the blameable behavior to your table in config/schema.yml

propel:
  my_table:
    id: ~
    created_by: { type: integer }
    ...
    _propel_behaviors:
      blameable:

Define the getId method in your myUser class :

function getId ()
{
  // TODO
}

Re-build your model classes :

symfony propel:build-model

Enjoy

Something went wrong with that request. Please try again.