Skip to main content

DS Data Provider: Trinity Data

A data fetch extension for OpenDXP Dynamic Search. Fetch opendxp elements by listings: assets, documents and objects.

Release Plan

ReleaseSupported OpenDXP VersionsSupported Symfony VersionsRelease DateMaintainedBranch
1.x1.0^7.42025Feature Branch1.x

Installation

"require" : {
"open-dxp/dynamic-search-bundle" : "~1.0.0",
"open-dxp/dynamic-search-data-provider-trinity-bundle" : "~1.0.0"
}

Dynamic Search Bundle

You need to install / enable the Dynamic Search Bundle first. Read more about it here. After that, proceed as followed:

Add Bundle to bundles.php:

<?php

return [
\OpenDxp\Bundle\DsTrinityDataBundle\OpenDxpDsTrinityDataBundle::class => ['all' => true],
];

Publishing State

This Bundle will fetch unpublished elements by default. This is crucial and also a problematic fact. Read more about it here to learn how to handle the publishing state of opendxp elements.

Basic Setup

opendxp_dynamic_search:
context:
default:
data_provider:
service: 'trinity_data'
options:
always:
index_object: true
object_class_names:
- TestClass
index_document: true
index_asset: false
full_dispatch:
object_limit: 20
document_limit: 10
normalizer:
service: 'trinity_localized_resource_normalizer'

Provider Options

always

NameDefault ValueDescription
index_assetfalse
asset_data_builder_identifiertrue
asset_typesAsset::getTypes(), except folder
asset_additional_params[]
index_objectfalse
object_data_builder_identifier'default'
object_typesDataObject::getTypes(), except folder
object_class_names[]
object_additional_params[]
index_documentfalse
document_data_builder_identifier'default'
document_typesDocument::getTypes(), except folder
document_additional_params[]

full_dispatch

NameDefault ValueDescription
asset_limit0
object_limit0
document_limit0

Resource Normalizer

trinity_default_resource_normalizer

Scaffold simple documents Options: none

trinity_localized_resource_normalizer

Scaffold localized documents

Options:

NameDefault ValueAllowed TypeDescription
localesall opendxp enabled languagesarray
skip_not_localized_documentstrueboolif false, an exception rises if a document/object has no valid locale

Transformer

Scaffolder

TrinityDataScaffolder

Identifier: trinity_data_scaffolder
Simple object scaffolder.
Supported types: Asset, Document, DataObject\Concrete.

Field Transformer

ElementIdExtractor

Identifier: element_id_extractor
Returns id of element

Return Type: string|int|null
Options: none

ElementPropertyExtractor

Identifier: element_property_extractor
Returns element property.

Return Type: string|null
Options:

NameDefault ValueAllowed TypeDescription
propertynullstring
object_getternullnullstring
allow_inherited_valuetruebool
NormalizerValueCallback

Identifier: normalizer_value_callback
Returns given option value.

Return Type: string|null
Options:

NameDefault ValueAllowed TypeDescription
valuenullstring
ObjectGetterExtractor

Identifier: object_getter_extractor
Returns value of object getter.

Return Type: bool|int|float|string|array|null
Options:

NameDefault ValueAllowed TypeDescription
methodidstring
arguments[]array
clean_stringtrueboolcleans HTML and whitespace (if value is string)
transform_callbacknullnull|closurea callback function for further value transform
ObjectRelationsGetterExtractor

Identifier: object_relations_getter_extractor
Returns values of object relations getter.

Return Type: array|null
Options:

NameDefault ValueAllowed TypeDescription
relationsnullstring
methodidstring
arguments[]array
ObjectPathGenerator

Identifier: object_path_generator
Returns object path generated by link generator.

Return Type: string|null
Options:

NameDefault ValueAllowed TypeDescription
arguments[]array
fetch_object_for_variantfalseboolIf true and object is type of variant the next parent gets fetched first until type object has been reached
DocumentMetaExtractor

Identifier: document_meta_extractor
Returns documents meta title or description.

Return Type: string|null
Options:

NameDefault ValueAllowed TypeDescription
typetitlestringPossible Types: title or description
DocumentPathGenerator

Identifier: document_path_generator
Returns real full path of document

Return Type: string|null
Options: none

PdfDataExtractor

Identifier: asset_pdf_extractor
Extracts pdf content with ghostscript

Return Type: string|null
Options: none

AssetPathGenerator

Identifier: asset_path_generator
Returns real full path of document

Return Type: string|null
Options: none


Upgrade Info

Before updating, please check our upgrade notes!

License

DACHCOM.DIGITAL AG, Löwenhofstrasse 15, 9424 Rheineck, Schweiz
dachcom.com, [email protected]
Copyright © 2025 DACHCOM.DIGITAL. All rights reserved.

For licensing details please visit LICENSE.md