openbuildings / jam-generated-feed
A module to generate xml files based on a jam collection
Installs: 28 841
Dependents: 0
Suggesters: 1
Security: 0
Stars: 1
Watchers: 12
Forks: 0
Open Issues: 0
Type:kohana-module
Requires
- php: >=5.3.0
- composer/installers: *
- kohana/minion: ^3.3
Requires (Dev)
- openbuildings/environment-backup: 0.1.*
- openbuildings/jam: ^0.5.13
- openbuildings/kohana-test-bootstrap: ^0.2.0
- phpunit/phpunit: ^4.0, <4.5
This package is not auto-updated.
Last update: 2020-01-24 15:11:13 UTC
README
A module to generate xml files based on a jam collection with a minion task
Usage
You need to add configuration to config/jam-generated-feed.php file:
return array( // Each key is a "name" of the feed, will be used when generating a new one 'products-uk' => array( // Jam model for the collection 'model' => 'product' // Optional filter that will be applied to the collection (in the form of $collection->{$filter_name}()) 'filter' => 'feed_products_uk', // What view to use to generate the feed. It would be passed a $collection variable with the Jam Collection 'view' => 'feeds/products-uk', // Where to output the file, prepends DOCROOT, overwrites 'file' => 'feeds/products-uk.xml', ), );
Using The Task
minion feed:generate --name=products-uk
Generating {"model":"product","filter":"feed_products_uk","view":"feeds\/products-uk","file":"feeds/products-uk.xml","name":"products-uk"}
Done.
Saving feed content to DOCROOT/test_file.xml
Done.
License
Copyright (c) 2012-2013, OpenBuildings Ltd. Developed by Ivan Kerin as part of clippings.com
Under BSD-3-Clause license, read LICENSE file.