Skip to content

airbear/yii2-yml-catalog

 
 

Repository files navigation

yii2-yml-catalog

Build Status Scrutinizer Code Quality Code Coverage Total Downloads

YML (Yandex Market Language) generator.

Install

Via Composer

$ composer require pastuhov/yii2-yml-catalog

Features

Usage

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

Testing

$ composer test

or

$ phpunit

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

GNU General Public License, version 2. Please see License File for more information.

About

YML (Yandex Market Language) generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%