/** * @return static */ public function getContent() { return $this->hasOne(ContentRecord::className(), ['id' => 'content_id'])->via('menuItemContent'); }
/** * @return \yii\db\ActiveQuery */ public function getContents() { return $this->hasMany(ContentRecord::className(), ['layout_id' => 'id']); }