本文整理汇总了PHP中app\models\Book::className方法的典型用法代码示例。如果您正苦于以下问题:PHP Book::className方法的具体用法?PHP Book::className怎么用?PHP Book::className使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Book
的用法示例。
在下文中一共展示了Book::className方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBooks
/**
* @return \yii\db\ActiveQuery
*/
public function getBooks()
{
return $this->hasMany(Book::className(), ['tour_id' => 'id']);
}
示例2: getBooks
/**
* @return $this
*/
public function getBooks()
{
return $this->hasMany(Book::className(), ['id' => 'book_id'])->viaTable(BooksUsers::tableName(), ['user_id' => 'id']);
}
示例3: getBooks
/**
* @return $this
*/
public function getBooks()
{
return $this->hasMany(Book::className(), ['id' => 'book_id'])->viaTable(BooksCategories::tableName(), ['category_id' => 'id']);
}
示例4: getBook
public function getBook()
{
return $this->hasOne(Book::className(), ['id' => 'book_id']);
}
示例5: getBooks
public function getBooks()
{
return $this->hasMany(Book::className(), ['id' => 'book_id'])->via('userBooks');
}
示例6: getBooks
public function getBooks()
{
return $this->hasMany(\app\models\Book::className(), ['book_id' => 'book_id'])->viaTable('rel_library_book', ['library_id' => 'library_id']);
}
示例7: getBooks
public function getBooks()
{
return $this->hasMany(Book::className(), ['id' => 'book_id'])->viaTable('genre_book', ['genre_id' => 'id']);
}
示例8: getBooks
/**
* @return \yii\db\ActiveQuery
*/
public function getBooks()
{
return $this->hasMany(Book::className(), ['author_id' => 'id'])->inverseOf('author');
}