/**
  * @return \yii\db\ActiveQuery
  */
 public function getContent0()
 {
     return $this->hasOne(Content::className(), ['id' => 'content']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContents()
 {
     return $this->hasMany(\common\models\Content::className(), ['flat_page_id' => 'id']);
 }
示例#3
0
文件: Page.php 项目: luobenyu/blog-1
 private function __construct()
 {
     self::$model = \Yii::$container->get(Content::className());
 }
示例#4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContent()
 {
     return $this->hasOne(\common\models\Content::className(), ['id' => 'content_id']);
 }
示例#5
0
文件: User.php 项目: luobenyu/blog-1
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContents()
 {
     return $this->hasMany(Content::className(), ['created_by' => 'id']);
 }