{"id":27198378,"url":"https://github.com/jorisros/feedbuilderbundle","last_synced_at":"2025-07-23T17:08:46.056Z","repository":{"id":57001471,"uuid":"115353210","full_name":"jorisros/FeedBuilderBundle","owner":"jorisros","description":"A bundle that creates a feed (xml/json) based on the output channel plugin from Pimcore.","archived":false,"fork":false,"pushed_at":"2019-10-09T13:02:57.000Z","size":131,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-15T06:25:14.297Z","etag":null,"topics":["pimcore","pimcore-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jorisros.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-25T17:20:30.000Z","updated_at":"2024-04-29T16:27:05.000Z","dependencies_parsed_at":"2022-08-21T11:40:47.176Z","dependency_job_id":null,"html_url":"https://github.com/jorisros/FeedBuilderBundle","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/jorisros/FeedBuilderBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorisros%2FFeedBuilderBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorisros%2FFeedBuilderBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorisros%2FFeedBuilderBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorisros%2FFeedBuilderBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jorisros","download_url":"https://codeload.github.com/jorisros/FeedBuilderBundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorisros%2FFeedBuilderBundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266717708,"owners_count":23973384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pimcore","pimcore-bundle"],"created_at":"2025-04-09T20:39:18.651Z","updated_at":"2025-07-23T17:08:46.024Z","avatar_url":"https://github.com/jorisros.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# FeedBuilderBundle\nFeedbuilder bundle is export bundle that helps to export data of pimcore to other systems.\n\n## Installation\nThe installation can be installed though composer. \n1. Run ``composer require jorisros/feed-builder-bundle`` to receive the bundle\n2. Enable the bundle ``bin/console pimcore:bundle:enable FeedBuilderBundle`` and then run ``./bin/console  pimcore:bundle:enable OutputDataConfigToolkitBundle`` because you need to have both enabled.\n3. Then reload the GUI of Pimcore, and there is a new menu item on the following location: Settings-\u003eSettings feedbuilder, this interface saves the in a configuration file on the following location ``var/config/feedbuilder.php`` \n\n## How does it works?\nThe working is quite simple, you discibe your export method to the level you want, that's give you data you want. This is based on the output channel bundle\n\n## Events\nWe can easily extend the feedbuilder to fit your own situation. The following event handlers are inside the builder to you can subscribe to events on different levels of the building of the feeds. \n\n| Event                       | Description  |\n| --------------------------- | ------------ |\n| feedbuilder.before.run      | This event is triggered as first event, the input of this event is the configuration of the feeed.             |\n| feedbuilder.after.selection | The event after the selection has been runned, this input for this event is the object listener. This is desgined for customize the query             |\n| feedbuilder.before.row      | This is the event before the object is converted to array, the input of this event is a object             |\n| feedbuilder.after.row       | The event after the object is converted from a object to a array. The input of this event is a array             |\n| feedbuilder.after.run       | Latest step of building the feed, this is triggered after looping through the objects. The input of the event is de result in a array.             |\n\n![Flow of the builder](https://raw.githubusercontent.com/jorisros/FeedBuilderBundle/master/Docs/img/flow.png)\n\n## Ignore cache in your feed\nIt is possible to ignore the cache in your feed while developing or testing. You can give the ``run`` method in the composer a second boolean parameter, so it clears the cache before it runs the query code.\nIn the browser you can add the following get parameter to the feed: ``...name-of-json.json?ignoreCache=true`` then the cache will be cleared before you run the feedbuilder.\n\n## Example of a export to JSON\nCreate a class and a method where the writer is been located.\n\n```php\n\u003c?php\n\nnamespace FeedBuilderBundle\\EventListener;\n\nuse FeedBuilderBundle\\Event\\FeedBuilderEvent;\n\nclass ExportExample\n{\n    const FEED_TITLE = 'Testfeed';\n\n    public function fileHandler(FeedBuilderEvent $event){\n\n        if($event-\u003egetConfig()-\u003eget('title') === self::FEED_TITLE)\n        {\n            $arr['products'] = $event-\u003egetResult();\n\n            $dir = PIMCORE_SYSTEM_TEMP_DIRECTORY.DIRECTORY_SEPARATOR.'export';\n\n            $name = 'json_export_'.time().'.json';\n            if(!file_exists($dir)){\n                mkdir($dir);\n            }\n            file_put_contents($dir.DIRECTORY_SEPARATOR.$name,json_encode($arr, JSON_PRETTY_PRINT));\n        }\n    }\n}\n```\n\nNow we have a writer that writes the json content to a file. Now we have to connect the listener after that the export has been runned. \nWe will do that in the ```service.yml```\n\n```yaml\n    FeedBuilderBundle\\EventListener\\ExportExample:\n        tags:\n            - { name: kernel.event_listener, event: feedbuilder.after.run, method: fileHandler }\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorisros%2Ffeedbuilderbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjorisros%2Ffeedbuilderbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorisros%2Ffeedbuilderbundle/lists"}