baldeweg/book-bundle

此包已被弃用且不再维护。未建议替代包。

提供书籍管理的工具。

安装: 203

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

v0.4.0 2022-03-10 11:45 UTC

This package is auto-updated.

Last update: 2022-03-26 11:39:43 UTC


README

提供书籍管理的工具。

入门指南

composer req baldeweg/book-bundle

在您的 config/bundles.php 中激活此包,如果尚未自动完成。

Baldeweg\Bundle\BookBundle\BaldewegBookBundle::class => ['all' => true],

构建新的查询。

use Baldeweg\Bundle\BookBundle\Search\Find;

$find = new Find($em, $term, $filter, $orderBy);
$find->setFields([]);
$find->setForcedFilters([]);
$find->find();

选项

查询

  • term - 字符串,操作符:like
  • filter - array
  • orderBy - array
    • book - array
    • author - array
  • limit - 整数
  • offset - 整数

过滤器

  • genre - array,操作符:in
  • lendOn - 整数,操作符:eq,gte,gt,lte,lt,null
  • branches - 整数,操作符:eq
  • releaseYear - 整数,操作符:eq,gte,gt,lte,lt,null
  • sold - 布尔值,操作符:eq
  • removed - 布尔值,操作符:eq
  • type - 字符串,操作符:eq
  • added - 整数,操作符:eq,gte,gt,lte,lt,null

排序

  • field - 字符串
  • direction - 字符串