本文整理匯總了PHP中app\models\Course::className方法的典型用法代碼示例。如果您正苦於以下問題:PHP Course::className方法的具體用法?PHP Course::className怎麽用?PHP Course::className使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\models\Course
的用法示例。
在下文中一共展示了Course::className方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getCourses
/**
* @return \yii\db\ActiveQuery
*/
public function getCourses()
{
return $this->hasMany(Course::className(), ['id' => 'course_id'])->viaTable('user_has_course', ['user_id' => 'id']);
}
示例2: getCourse
public function getCourse()
{
return $this->hasOne(Course::className(), ['course_id' => 'course_id']);
}
示例3: getTmCrs
/**
* @return \yii\db\ActiveQuery
*/
public function getTmCrs()
{
return $this->hasOne(Course::className(), ['crs_id' => 'tm_crs_id']);
}
示例4: getCourse
public function getCourse()
{
return $this->hasOne(Course::className(), ['id' => 'course_id'])->viaTable('course_vacancy', ['vacancy_id' => 'id']);
}
示例5: getTmCrs
/**
* @return \yii\db\ActiveQuery
*/
public function getTmCrs()
{
return $this->hasMany(Course::className(), ['crs_id' => 'tm_crs_id'])->viaTable('teacher_matrix', ['tm_tchr_id' => 'tchr_id']);
}
示例6: getCoursePreferences
public function getCoursePreferences()
{
return $this->hasMany(Course::className(), ['id' => 'course_type_id'])->viaTable('student_course_preference', ['student_id' => 'id'])->all();
}
示例7: getCourses
/**
* @return \yii\db\ActiveQuery
*/
public function getCourses()
{
return $this->hasMany(Course::className(), ['crs_ct_id' => 'ct_id']);
}
示例8: getCourse
public function getCourse()
{
return $this->hasMany(Course::className(), ['category_id' => 'category_id']);
}
示例9: getCcCrs
/**
* @return \yii\db\ActiveQuery
*/
public function getCcCrs()
{
return $this->hasMany(Course::className(), ['crs_id' => 'cc_crs_id'])->viaTable('course_campus', ['cc_cmps_id' => 'cmps_id']);
}