Home > cakephp-eav-behavior

cakephp-eav-behavior

Cakephp-eav-behavior is a project mainly written in PHP, it's free.

A simple behavior for cakephp that abstracts common EAV functionality

This behavior assumes we have a model (the entity table) and an model_attribute table (the attribute table) and a join table between the two (an EAV table).

for example: widgets, widget_attributes, and widgets_widget_attributes

The attribute table needs a key field. The EAV table needs a val field.

This behavior also requires that the Widget model has a HABTM association with WidgetAttribute (the name of the associated table can be controlled with the 'with' setting in the $actsAs array).

Also requires the name of the HABTM association to match the 'with' setting