/** * 获取所在tab * @return \yii\db\ActiveQuery */ public function getTab() { return $this->hasOne(Tab::className(), ['id' => 'tab_id']); }