コード例 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContent0()
 {
     return $this->hasOne(Content::className(), ['id' => 'content']);
 }
コード例 #2
0
ファイル: FlatPage.php プロジェクト: eltortuganegra/heavyCMS
 /**
  * @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']);
 }