コード例 #1
0
ファイル: EntityType.php プロジェクト: frenzelgmbh/cm-entity
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEntityTypes()
 {
     return $this->hasMany(EntityType::className(), ['parent_id' => 'id']);
 }
コード例 #2
0
ファイル: Entity.php プロジェクト: frenzelgmbh/cm-entity
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEntityType()
 {
     return $this->hasOne(EntityType::className(), ['id' => 'entity_type_id']);
 }