PHPackages                             se7enxweb/explayouts-relation-list-query - 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. se7enxweb/explayouts-relation-list-query

ActiveEzpublish-legacy-extension

se7enxweb/explayouts-relation-list-query
========================================

Relation list collection query handlers for Exponential Layouts on Exponential Legacy / Exponential 6, replacing netgen/layouts-ibexa-relation-list-query.

10PHP

Since Jul 31Pushed yesterdayCompare

[ Source](https://github.com/se7enxweb/explayouts_relation_list_query)[ Packagist](https://packagist.org/packages/se7enxweb/explayouts-relation-list-query)[ RSS](/packages/se7enxweb-explayouts-relation-list-query/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Exponential Layouts Relation List Query
=======================================

[](#exponential-layouts-relation-list-query)

General description
-------------------

[](#general-description)

Exponential Layouts Relation List Query (`explayouts_relation_list_query`) provides relation list collection query handlers for Exponential Layouts on Exponential Legacy / Exponential 6. Given a source content object, the queries return its `ezobjectrelationlist` field relations (or its reverse relations) as `expLayoutsContentBrowserItem` objects, with content-class filtering, sorting and pagination — the data source pattern used by layout collection blocks.

This extension is an Exponential Legacy port inspired by `netgen-layouts/layouts-ibexa-relation-list-query` and provides the following capabilities:

- Forward relation queries - Use this feature to read an `ezobjectrelationlist` field and return the related items in editor-defined or attribute-based order.
- Reverse relation queries - Use this feature to find the objects that relate back to a given item, optionally restricted to relations made through a specific field ("who links here").
- Filtering, sorting and pagination - Use this feature to include/exclude content classes, choose sort type and direction, and page the results.
- Layout collection integration - Use the `exp_content_relation_list` and `exp_content_reverse_relation_list` query types to drive dynamic collections from the layouts admin UI.

Features
--------

[](#features)

The following features are provided by the Exponential Layouts Relation List Query extension:

- A forward relation query, `expLayoutsRelationListQuery`, that resolves a source content object (by `content_id`, or by `location_id` when `use_current_location` prefers it), reads the named `ezobjectrelationlist` field and returns the related items as `expLayoutsContentBrowserItem[]`. Items are built from each related object's main node; related objects without a main node are skipped.
- A reverse relation query, `expLayoutsReverseRelationListQuery`, that finds objects relating back to the selected item. When a `field_identifier` is given, it is resolved to a class attribute ID on the source object's class and passed to `eZContentObject::reverseRelatedObjectList()`, so results can be limited to relations made through one specific field.
- A convenience factory, `expLayoutsRelationListQueryFactory`, with `relation()` / `reverseRelation()` shortcuts; direct construction (`new expLayoutsRelationListQuery()`) works identically.
- A single, uniform entry point — `execute( $params = array() )` — on both query classes, with a rich parameter set:
    - `content_id` — source content object ID.
    - `location_id` — source location/node ID (used when `content_id` is absent, or preferred when `use_current_location` is set).
    - `use_current_location` — prefer `location_id` over `content_id` when both are given.
    - `field_identifier` — identifier of the `ezobjectrelationlist` field (required for the forward query; optional field filter for the reverse query).
    - `sort_type` — `defined_by_field` (forward default, i.e. the order editors arranged the relations in), `date_published` (reverse default), `date_modified`, `content_name`, `location_priority`.
    - `sort_direction` — `asc` or `desc` (default `desc`).
    - `content_types` / `content_types_filter` — class identifier list with `include` (default) or `exclude` semantics.
    - `limit` / `offset` — pagination; `0` means unlimited.
- Layout collection integration through the query type identifiers `exp_content_relation_list` and `exp_content_reverse_relation_list`, registered in `extension/explayouts/settings/explayouts.ini.append.php`and selectable as the query type of a dynamic collection in the layouts admin UI.
- Stage-by-stage `protected` internals — `resolveContent()`, `relatedObjectIds()` / `reverseRelatedObjects()`, `filterByContentType()`, `sort()`, `applyLimitOffset()` — so subclasses can replace individual steps (for example, adding `ezobjectrelation` support in `relatedObjectIds()`).
- Standalone by design: the classes work in custom modules, block handlers and CLI scripts, independent of the layout collection runtime.

Version
-------

[](#version)

- The current version of Exponential Layouts Relation List Query is 1.0.0
- Last Major update: July 30, 2026

Copyright
---------

[](#copyright)

- Exponential Layouts Relation List Query is copyright 1998 - 2026 7x
- See: [LICENSE.md](LICENSE.md) for more information on the terms of the copyright and license

License
-------

[](#license)

Exponential Layouts Relation List Query is licensed under the GNU General Public License.

The complete license agreement is included in the [LICENSE.md](LICENSE.md)file.

Exponential Layouts Relation List Query is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License or at your option a later version.

Exponential Layouts Relation List Query is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The GNU GPL gives you the right to use, modify and redistribute Exponential Layouts Relation List Query under certain conditions. The GNU GPL license is distributed with the software, see the file [LICENSE.md](LICENSE.md).

It is also available at

You should have received a copy of the GNU General Public License along with Exponential Layouts Relation List Query in [LICENSE.md](LICENSE.md). If not, see .

Using Exponential Layouts Relation List Query under the terms of the GNU GPL is free (as in freedom).

For more information or questions please contact

Requirements
------------

[](#requirements)

The following requirements exist for using the Exponential Layouts Relation List Query extension:

Exponential version

- Make sure you use Exponential 6 / Exponential Legacy.

PHP version

- Make sure you have PHP 8.1, 8.2, 8.3 or 8.4.

Extension dependencies

- `explayouts_content_browser` — the queries return `expLayoutsContentBrowserItem` objects. Activate it first.
- `explayouts` — required only for the layout collection integration (the `exp_content_relation_list` / `exp_content_reverse_relation_list` query types and their handlers live there); the classes in this extension also work standalone.

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

[](#installation)

Installation is the standard extension procedure: place the extension in `extension/explayouts_relation_list_query`, activate it after its dependencies via `ActiveExtensions[]` (or `ActiveAccessExtensions[]` for a single siteaccess), regenerate autoloads with `php bin/php/ezpgenerateautoloads.php -e` and clear caches with `php bin/php/ezcache.php --clear-all --purge --allow-root-user`.

See [INSTALL.md](INSTALL.md) for the complete step-by-step installation instructions.

Usage
-----

[](#usage)

The extension ships three classes:

ClassFilePurpose`expLayoutsRelationListQuery``classes/explayoutsrelationlistquery.php`Reads an `ezobjectrelationlist` field and returns the related items`expLayoutsReverseRelationListQuery``classes/explayoutsreverserelationlistquery.php`Finds objects that relate back to the selected item, optionally per field`expLayoutsRelationListQueryFactory``classes/explayoutsrelationlistqueryfactory.php``relation()` / `reverseRelation()` factory shortcutsA quick example:

```

```

Reverse relations ("who links here"):

```

```

For layout collections, the Exponential Layouts collection runtime registers the relation list query types in `extension/explayouts/settings/explayouts.ini.append.php`:

```
[QuerySettings]
AvailableQueries[]=exp_content_relation_list
AvailableQueries[]=exp_content_reverse_relation_list

[QueryType_exp_content_relation_list]
Name=Exp relation list
Handler=expLayoutsRelationListQueryHandler

[QueryType_exp_content_reverse_relation_list]
Name=Exp reverse relation list
Handler=expLayoutsReverseRelationListQueryHandler
```

Pick `exp_content_relation_list` or `exp_content_reverse_relation_list` as the query type of a dynamic collection in the layouts admin UI. Those handler classes ship with the `explayouts` extension and support `use_current_location` against the currently viewed page; the classes in this extension are the standalone port of the upstream package for direct PHP use (custom modules, block handlers, CLI scripts).

The full usage guide in [doc/USAGE.md](doc/USAGE.md) covers the complete parameter reference, usage scenarios ("related articles" boxes, "who links here" listings, location-based source resolution, CLI usage), how the two layers relate, and the three customization layers of this stack: the settings layer (overriding the query type `Name=` / `Handler=` through the INI configuration cascade), the template layer (collection items are rendered by your layouts block templates) and the PHP layer (the `protected` stage methods and custom handler classes).

Documentation
-------------

[](#documentation)

DocumentDescription[INSTALL.md](INSTALL.md)Requirements, dependencies and step-by-step activation instructions[doc/USAGE.md](doc/USAGE.md)Parameter reference, scenarios, collection query types and the settings/template/PHP customization layers[doc/FAQ.md](doc/FAQ.md)Frequently asked questions and answers[doc/TODO.md](doc/TODO.md)Known gaps and planned improvements[doc/SUPPORT.md](doc/SUPPORT.md)Where and how to get help[LICENSE.md](LICENSE.md)The complete GNU General Public License agreementTroubleshooting
---------------

[](#troubleshooting)

Read the FAQ

- Some problems are more common than others. The most common ones are listed in [doc/FAQ.md](doc/FAQ.md).

Use our support systems

- If you find a bug or defect, please report it to the [Exponential Layouts Relation List Query: Issue Tracker](https://github.com/se7enxweb/explayouts_relation_list_query/issues)
- For commercial support and custom development please visit [se7enx.com](https://se7enx.com)

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance65

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1083669?v=4)[7x](/maintainers/7x)[@7x](https://github.com/7x)

---

Top Contributors

[![se7enxweb](https://avatars.githubusercontent.com/u/51429274?v=4)](https://github.com/se7enxweb "se7enxweb (4 commits)")

### Embed Badge

![Health badge](/badges/se7enxweb-explayouts-relation-list-query/health.svg)

```
[![Health](https://phpackages.com/badges/se7enxweb-explayouts-relation-list-query/health.svg)](https://phpackages.com/packages/se7enxweb-explayouts-relation-list-query)
```

PHPackages © 2026

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