/** * Returns the related ContentContainer model (e.g. Space or User) * * @see ContentContainer * @return \yii\db\ActiveQuery */ public function getContentContainerRecord() { return $this->hasOne(ContentContainer::className(), ['pk' => 'id'])->andOnCondition(['class' => self::className()]); }
/** * Relation to ContentContainer model * Note: this is not a Space or User instance! * * @since 1.1 * @return \yii\db\ActiveQuery */ public function getContentContainer() { return $this->hasOne(ContentContainer::className(), ['id' => 'contentcontainer_id']); }