trOidPropelBehaviorPlugin - 1.0.5

Propel nested set behavior

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source

trOidPropelBehaviorPlugin plugin

The trOidPropelBehaviorPlugin is a symfony plugin that provides automatic generation of "Object IDentifier" for any propel object.


* Install the plugin

    symfony plugin:install trOidPropelBehaviorPlugin

    Stable version 
    svn co

    Developer version
    svn co

* Enable Propel behavior support in propel.ini:

    propel.builder.AddBehaviors = true

* Add necessary fields to your model
* Rebuild your database and model

    symfony propel:build-all

* Enable the generator behavior for one of your Propel model:

    // lib/model/News.php
    class News

    sfPropelBehavior::add( 'News', array( 'trOidObjectGenerator' => array( 'oid_column' => 'my_object_oid_column', 'delete_object_oid' => false ) ) );

* Enable the viewer behavior for one of your Propel model:

    // lib/model/ObjectLog.php
    class ObjectLog

    sfPropelBehavior::add( 'ObjectLog', array( 'trOidObjectViewer' => array( 'oid_column' => 'fk_object_oid_column' ) ) );


Each time an object is saved, the behavior will verify validity of its OID. A new OID will be attributed to object if it does not already have one.

Public API


  • getObjectOidData() : Return object oid data
  • getObjectByOid() : Return object represent by oid


  • Documentation