Backend Search
Backend Search providers add package data to the administration desktop search. Use them when administrators should find package objects from the global search instead of opening a package-specific panel first.
Register A Provider
Declare the provider in package.xml:
<quiqqer>
<package>
<provider>
<desktopSearch src="\Vendor\Package\BackendSearch\Provider"/>
</provider>
</package>
</quiqqer>The provider class must implement QUI\BackendSearch\ProviderInterface.
Provider Interface
namespace Vendor\Package\BackendSearch;
use QUI\BackendSearch\ProviderInterface;
class Provider implements ProviderInterface
{
public function buildCache(): void
{
}
public function search(string $search, array $params = []): array
{
return [];
}
public function getEntry(string|int $id): mixed
{
return null;
}
public function getFilterGroups(): array
{
return [];
}
}search() returns the visible result list. getEntry() returns the action data for one selected result. getFilterGroups() exposes filter groups that the search UI can use.
Search Results
A result entry should contain stable fields that the UI can render:
[
'id' => 'project-en-42',
'title' => 'Footer Teaser',
'description' => 'example (en) | brick/text',
'icon' => 'fa fa-cubes',
'groupLabel' => 'Bricks',
'group' => 'bricks'
]Use stable IDs. If an ID encodes multiple values, keep the format simple and parse it defensively in getEntry().
Entry Actions
getEntry() can return searchdata with a JavaScript control and parameters. The control handles what happens when the user opens the search result.
return [
'searchdata' => json_encode([
'require' => 'package/vendor/package/bin/BackendSearch/Provider',
'params' => [
'id' => $id
]
])
];The quiqqer/bricks package is a public reference for this pattern. It registers a desktopSearch provider in package.xml, implements QUI\BackendSearch\ProviderInterface, returns grouped search results, and opens entries through a package JavaScript control.
Filter Groups
Return filter groups when the provider has its own searchable object type:
return [
[
'group' => 'vendor-package',
'label' => ['vendor/package', 'search.provider.filter.label']
]
];Use locale references for labels when the provider is user-facing.
