PHPackages                             bdunogier/ezplatform-query-fieldtype - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. bdunogier/ezplatform-query-fieldtype

Abandoned → [ezsystems/ezplatform-query-fieldtype](/?search=ezsystems%2Fezplatform-query-fieldtype)Ezplatform-bundle[API Development](/categories/api)

bdunogier/ezplatform-query-fieldtype
====================================

An eZ Platform Field Type that defines a query.

v0.2(7y ago)07GPL-2.0PHP &gt;=7.1

Since Nov 12Pushed 6y agoCompare

[ Source](https://github.com/bdunogier/ezplatform-query-fieldtype)[ Packagist](https://packagist.org/packages/bdunogier/ezplatform-query-fieldtype)[ RSS](/packages/bdunogier-ezplatform-query-fieldtype/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

eZ Platform Query Field Type
============================

[](#ez-platform-query-field-type)

This Field Type will let a content manager map an executable Repository Query to a Field.

Example use-cases:

- a `place.nearby_places` field that returns Place items less than X kilometers away from the current content, based on its own `location` field
- a `gallery.images` field that returns Image items that are children of the current gallery item's main location

The idea is to move content and structure logic implemented in controllers and templates to the repository itself.

Installation
------------

[](#installation)

Add the package to the requirements:

```
composer require ezsystems/ezplatform-query-fieldtype:^1.0@dev

```

Add the package to `app/AppKernel.php`:

```
$bundles = [
  // ...
  new EzSystems\EzPlatformQueryFieldType\Symfony\EzSystemsEzPlatformQueryFieldTypeBundle(),
];
```

Add the bundle routes to `config/routing.yaml`:

```
ezplatform.query_fieldtype.routes:
    resource: '@EzSystemsEzPlatformQueryFieldTypeBundle/Resources/config/routing/'
    type: directory
```

Usage
-----

[](#usage)

Add a Content query field to a content type.

In the Field Definition settings, select a Query Type from the list, as well as the content type that is returned by that field.

Parameters are used to build the query on runtime. They are either static, or mapped to properties from the content the field value belongs to. The syntax YAML, with the key being the name of a query type parameter, and the value either a scalar, or an [expression](https://symfony.com/doc/current/components/expression_language.html).

The following variables are available for use in expressions:

- `string returnedType`: the identifier of the content type that was previously selected
- `eZ\Publish\API\Values\Content\Content content`: the current content item Also gives you access to fields values. Example with an `ezurl` field: `@=content.getFieldValue('url').link`
- `eZ\Publish\API\Values\Content\ContentInfo contentInfo`: the current content item's content info
- `eZ\Publish\API\Values\Content\Location mainLocation`: the current content item's main location

A simple example, for a LocationChildren query type that expects:

- `parent_location_id`: id of the location to fetch children for
- `content_types`: content type identifier or array of identifiers to filter on

```
parent_location_id: "@=mainLocation.id"
content_types: "@=returnedType"
```

See the [`examples`](doc/examples/) directory for full examples.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~196 days

Total

3

Last Release

2384d ago

Major Versions

v0.2 → 1.0.x-dev2019-12-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/235928?v=4)[Bertrand Dunogier](/maintainers/bdunogier)[@bdunogier](https://github.com/bdunogier)

---

Top Contributors

[![alongosz](https://avatars.githubusercontent.com/u/7099219?v=4)](https://github.com/alongosz "alongosz (5 commits)")[![webhdx](https://avatars.githubusercontent.com/u/10212760?v=4)](https://github.com/webhdx "webhdx (4 commits)")[![lserwatka](https://avatars.githubusercontent.com/u/130489?v=4)](https://github.com/lserwatka "lserwatka (4 commits)")[![micszo](https://avatars.githubusercontent.com/u/13622502?v=4)](https://github.com/micszo "micszo (3 commits)")[![adamwojs](https://avatars.githubusercontent.com/u/211967?v=4)](https://github.com/adamwojs "adamwojs (3 commits)")[![Nattfarinn](https://avatars.githubusercontent.com/u/5822569?v=4)](https://github.com/Nattfarinn "Nattfarinn (2 commits)")[![mnocon](https://avatars.githubusercontent.com/u/10993858?v=4)](https://github.com/mnocon "mnocon (1 commits)")[![dew326](https://avatars.githubusercontent.com/u/12594013?v=4)](https://github.com/dew326 "dew326 (1 commits)")[![arfaram](https://avatars.githubusercontent.com/u/793247?v=4)](https://github.com/arfaram "arfaram (1 commits)")[![jheba](https://avatars.githubusercontent.com/u/290289?v=4)](https://github.com/jheba "jheba (1 commits)")[![mikolajkaraczyn](https://avatars.githubusercontent.com/u/60875046?v=4)](https://github.com/mikolajkaraczyn "mikolajkaraczyn (1 commits)")

### Embed Badge

![Health badge](/badges/bdunogier-ezplatform-query-fieldtype/health.svg)

```
[![Health](https://phpackages.com/badges/bdunogier-ezplatform-query-fieldtype/health.svg)](https://phpackages.com/packages/bdunogier-ezplatform-query-fieldtype)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
