Код: Выделить всё
public function behaviors()
{
Yii::info($this); // ?
return [
'upload' => [
'class' => UploadBehavior::className(),
'file1' => [
'uploadPath' => $this->parent.'/name', // this parent null
],
'file2' => [
'uploadPath' => 'images/'.$this->relation->attr.'/another', // this relaion null
]
],