openbuildings/jam-generated-feed

此包已被废弃且不再维护。未建议替代包。

一个基于 jam 集合生成 xml 文件的模块

安装数量: 28,841

依赖项: 0

建议者: 1

安全: 0

星标: 1

关注者: 12

分支: 0

公开问题: 0

类型:kohana-module

0.1.5 2016-09-18 09:02 UTC

This package is not auto-updated.

Last update: 2020-01-24 15:11:13 UTC


README

Build Status Coverage Status Latest Stable Version

一个模块,用于通过 minion 任务根据 jam 集合生成 xml 文件

使用方法

您需要将配置添加到 config/jam-generated-feed.php 文件中

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',
	),
);

使用任务

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.

许可证

版权所有 (c) 2012-2013, OpenBuildings Ltd. 由 Ivan Kerin 在 clippings.com 开发

在 BSD-3-Clause 许可下,请参阅 LICENSE 文件。