torq / pimcore-helpers-bundle
Package info
github.com/TorqIT/pimcore-helpers-bundle
Type:pimcore-bundle
pkg:composer/torq/pimcore-helpers-bundle
Requires
- ext-sodium: *
- phpdocumentor/reflection-docblock: ^5.6
- pimcore/pimcore: ^11.0 || ^12.0 || ^2026.1
- symfony/serializer-pack: ^v1.3.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v3.5.0
- v3.4.1
- v3.4.0
- v3.3.1
- v3.3.0
- v3.2.6
- v3.2.5
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.x-dev
- v2.8.5
- v2.8.4
- v2.8.3
- v2.8.2
- v2.8.1
- v2.8.0
- v2.7.1
- v2.7.0
- v2.6.2
- v2.6.1
- v2.6.0
- v2.5.0
- v2.4.0
- v2.3.0
- v2.2.0
- v2.1.1
- v2.1.0
- 2.0.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- dev-feature/custom-quick-actions
- dev-bug/invalid-date-format
- dev-bug/update-to-check-composite-index
- dev-bugfix/imp-4274-encrypt-hashed-input-in-setter
- dev-bugfix/imp-4396-encrypt-hashed-input-in-setter
- dev-feature/package-updates
- dev-fix/conditional-studio-services-load
- dev-feature/add-re-index-feature-to-studio
- dev-bugfix/add-missing-service-autoconfigure-defaults
- dev-fix/vuln-upgrades-20260812
- dev-feature/imp-4164-product-basevariant-endpoints
- dev-feature/imp-4093-621-update-odc-to-match-new-dqr-11-format
- dev-feature/data-generation-engine
- dev-support-pimcore-2026.1
- dev-fix/tsconfig-trailing-comma
- dev-fix/date-ranges-returning-iterables
- dev-feature/pim-3581-data-transformation-hash
- dev-feature/array-field-type
- dev-feature/license-updated
- dev-feature/pimcore-12
- dev-feature/website-setting-repository-v11
- dev-feature/website-setting-repository
This package is auto-updated.
Last update: 2026-11-03 14:35:25 UTC
README
A collection of helpful services, utilities, and extensions for Pimcore.
Installation
- Install the composer package:
composer require torq/pimcore-helpers-bundle
- Add the bundle to
Kernel.phporbundles.php:$collection->addBundle(new TorqPimcoreHelpersBundle());
- (Optional) If using the
HashedInputcustom field type, make sure to add the "torq_pimcore_helpers.secret" parameter to the Symfony container inservices.yaml:parameters: torq_pimcore_helpers.secret: "%env(MY_SECRET_VAR)%"
Repository
The repository pattern wraps fetching, saving, and deleting Pimcore elements (assets, objects, etc.). There are several benefits to this pattern:
- Co-location of fetching logic; complicated querying logic can be encapculated into a single spot, promoting reusable queries over random queries sprinkled throughout the service layer.
- Mocks for testing; mocking static database read/writes is challenging, mocking a repository method is easy.
Normalizer
A full set of Symfony normalizers for Pimcore's unique object types including data objects, asset, field collections, object bricks, blocks, classification stores, etc.
Startup Commands
Set the #[AsStartupCommand] attribute on a Symfony command and add the following to the deploy or startup script:
bin/console torq:run-startup-commands
To automatically run that command on deploy/start-up. Startup commands are tracked in the startup_command_runs
database
table and are only run once by default. Set #[AsStartupCommand(repeatable: true)] to define a command which should be
run every time.
Studio Quick Actions
Quick Actions are simple one-click commands – queue a job, clear a cache, trigger a resync. Requires the
quick_actions permission to use.
Defining custom actions
To define a quick action, set up the bundle as a Module Federation remote for your Studio extension:
// rsbuild.config.ts import {defineConfig} from "@rsbuild/core"; import {pluginModuleFederation} from "@module-federation/rsbuild-plugin"; export default defineConfig({ // Set dts for development builds only, production builds do not need types dts: { consumeTypes: { remoteTypeUrls: { pimcore_helpers_bundle: { alias: "@torq/pimcore-helpers-bundle", zip: "http://localhost:3033/@mf-types.zip", api: "http://localhost:3033/@mf-types.d.ts", }, }, }, }, plugins: [ pluginModuleFederation({ remotes: { "@pimcore/studio-ui-bundle": createDynamicRemote("pimcore_studio_ui_bundle"), "@torq/pimcore-helpers-bundle": createDynamicRemote("pimcore_helpers_bundle"), }, }) ] })
Then register the action as a dynamic type using the registry:
// CustomQuickActionPlugin.tsx import {container, IAbstractPlugin} from "@pimcore/studio-ui-bundle"; import {QUICK_ACTION_REGISTRY_SERVICE_ID, type QuickActionRegistry} from "@torq/pimcore-helpers-bundle"; export const CustomQuickActionPlugin: IAbstractPlugin = { name: "CustomQuickActionPlugin", onInit({container}) { const registry = container.get<QuickActionRegistry>(QUICK_ACTION_REGISTRY_SERVICE_ID); registry.registerDynamicType({ id: "custom-quick-action", title: "Custom Quick Action", permission: "custom_action_permission", // set null for no permission. Users must still have quick_actions permission onClick: async (signal?: AbortSignal) => { await triggerCustomAction(signal); }, }); }, };
License
This bundle is licensed under the Pimcore Open Core License (POCL) and is intended for use with Pimcore Platform 2025.1 and newer.
See LICENSE.md for full license text.
