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