YML (Yandex Market Language) generator.
Via Composer
$ composer require pastuhov/yii2-yml-catalog
Configure the [[yii\base\Application::controllerMap|controller map]] in the application configuration. For example:
[
'controllerMap' => [
...
// declares "yml" controller using a configuration array
'yml' => [
'class' => 'pastuhov\ymlcatalog\controllers\YmlCatalogController',
'shopClass' => 'frontend\models\Shop',
'categoryClass' => 'frontend\models\Category',
'offerClass' => [
'frontend\models\Item'
],
'fileName' => 'yml.xml',
'enableGzip' => true,
'publicPath' => '@frontend/web'
],
],
]
Then you may type:
$ yii yml/generate
$ composer test
or
$ phpunit
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
GNU General Public License, version 2. Please see License File for more information.