예제 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBlock()
 {
     return $this->hasOne(Block::className(), ['id' => 'block_id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBlocks()
 {
     return $this->hasMany(Block::className(), ['state' => 'name']);
 }