What is the most Yii friendly 'standard' way to reference a record of any model?
I'm attempting to build a menu system where a user can create a menu item which links to another item on the site. Obviously a user would be able to link to a variety of types of content (models). I would to work this without using urls as the internal reference to give me greater flexibility.
So as mentioned in the comment bellow some sort of 'unified primary key'
I was thinking either every model is an extension of a base model and reference that, like in this question. Or to simply have a separate field for each model that can be referenced.
Maybe another way to do it would be to store the model and record id in a field and then just override active records relational 'magic'