But when want to access to my second attribute file with getUploadFilePath('file'), it returns me an error : Missing behavior for attribute 'file'. When I var_dump the current behavior class, in FileUploadBehavior, it says that file is an instance of ImageUploadBehavior which is incorrect.
When I change $behavior instanceof static to $behavior instanceof self it works.
So the problem comes when in the model behaviors function the two types are declared ;)
See #3
I have the to types of behaviors (ImageUploadBehavior & FileUploadBehavior) in my model :
But when want to access to my second attribute file with
getUploadFilePath('file')
, it returns me an error :Missing behavior for attribute 'file'
. When I var_dump the current behavior class, in FileUploadBehavior, it says that file is an instance of ImageUploadBehavior which is incorrect. When I change$behavior instanceof static
to$behavior instanceof self
it works.So the problem comes when in the model behaviors function the two types are declared ;)
Thank you !