bdunogier/ezplatform-query-bundle

为 eZ Platform 添加围绕存储库查询功能的组件。

安装: 0

依赖项: 0

建议者: 0

安全: 0

星星: 1

关注者: 1

分支: 0

开放问题: 0

类型:ezplatform-bundle

dev-master 2016-11-19 10:54 UTC

This package is auto-updated.

Last update: 2024-09-19 11:41:12 UTC


README

为基于 Symfony 的开源 CMS eZ Platform 提供额外存储库查询功能的组件。

安装

功能

大多数功能涉及 QueryTypes,预定义的 QueryObjects 接受参数,并返回一个命名查询。

列出 QueryTypes

此命令可以列出已注册的 QueryTypes,并显示特定一个的详细信息

# php app/console bd:query:types
There are 2 registered QueryTypes:

- AppBundle:LatestContent
- AppBundle:Menu


# php app/console bd:query:types AppBundle:LatestContent
Class: "AppBundle\QueryType\LatestContentQueryType"
Service: "app.query_type.latest_content",
Parameters: location_id, limit

运行查询

此命令运行一个查询,该查询由 QueryType 构建,并显示结果

# php app/console bd:query:run AppBundle:LatestContent location_id:2 
3 result(s) found in 0.06 seconds:

[60] Top Stories (blog)
[58] Contact Us (contact_form)
[59] Projects (gallery)