The AutoExpireBehavior adds automatic expiration to your model.
See the Propel documentation on how to install a third party behavior
Just add the following XML tag in your
<behavior name="auto_expire" />
The behavior will add a column storing the expiration date and those methods:
The following options are provided to customize the behavior.
column option defines the name of the column to store the expiration date into.
If the column is not given, it will be added. Defaults to
required flag indicates whether the expiration date is required.
true the column will be
auto_delete option can be set to automatically delete the expired model.
When set, this option will apply the "Expiration" behavior to the
postHydrate hook of the model.
Whenever a model expires by calling
expire, the following behavior is applied - similar to
preExpiremethod is called. The process will be aborted, if this methods returns
doExpiremethod will be called.
postExpiremethod is called afterwards.
In addition, the
isExpired method will be added to check whether the model is expired.