Answer the question
In order to leave comments, you need to log in
Why does behavior() return an empty array?
There is a model inherited by yii\db\ActiveRecord
in the model there is a method
public function behaviors()
{
return [
'loggerBehavior' => [
'class' => LoggerBehavior::className(),
'create' => true,
'update' => true,
'delete' => true,
],
'mlBehavior' => [
'class' => MultiLanguageBehavior::className(),
'mlConfig' => [
'db_table' => 'translations_with_string',
'attributes' => ['text', 'title', 'image_url', 'image_alt', 'input_name'],
'admin_routes' => [
'admin/*'
]
],
],
];
}
Answer the question
In order to leave comments, you need to log in
In short, I renamed the model and everything worked. I have no idea how it is related.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question