M
M
Maxim Timofeev2017-04-03 11:46:02
Yii
Maxim Timofeev, 2017-04-03 11:46:02

How to make getDirtyAttributes() work when using yii2-multilingual-behavior?

There is a behavior for multilingual:
https://github.com/OmgDef/yii2-multilingual-behavior
Everything about it is good, except that it $model->getDirtyAttributes()returns an empty array. Whether and it is very necessary to check values ​​have changed. Has anyone made a bike for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
padlyuck, 2017-04-03
@webinar

try checking $model->translations[0]->getDirtyAttributes()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question