<commit_before><?php

/*
 * Finance Plugin for HiPanel
 *
 * @link      https://github.com/hiqdev/hipanel-module-finance
 * @package   hipanel-module-finance
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2014-2015, HiQDev (http://hiqdev.com/)
 */

namespace hipanel\modules\finance;

use hipanel\modules\finance\models\Merchant;
use Yii;

class Plugin extends \hiqdev\pluginmanager\Plugin
{
    public function items()
    {
        return [
            'aliases' => [
                '@bill'   => '/finance/bill',
                '@purse'  => '/finance/purse',
                '@tariff' => '/finance/tariff',
                '@pay'    => '/merchant/pay',
                '@cart'   => '/cart/cart',
            ],
            'menus' => [
                'hipanel\modules\finance\SidebarMenu',
            ],
            'modules' => [
                'finance' => [
                    'class' => 'hipanel\modules\finance\Module',
                ],
                'cart' => [
                    'class'          => 'hiqdev\yii2\cart\Module',
                    'termsPage'      => Yii::$app->params['orgUrl'] . 'rules',
                    'orderPage'      => '/finance/cart/select',
                    /*'orderButton'    => function ($module) {
                        return Yii::$app->getView()->render('@hipanel/modules/finance/views/cart/order-button', [
                            'module' => $module,
                        ]);
                    },*/
                    'paymentMethods' => function () {
                        return Yii::$app->getView()->render('@hipanel/modules/finance/views/cart/payment-methods', [
                            'merchants' => Yii::$app->getModule('merchant')->getCollection([])->getItems(),
                        ]);
                    },
                    'shoppingCartOptions' => [
                        'on cartChange' => ['hipanel\modules\finance\cart\CartCalculation', 'execute']
                    ],
                ],
                'merchant' => [
                    'class'           => 'hiqdev\yii2\merchant\Module',
                    'notifyPage'      => '/finance/pay/notify',
                    'finishPage'      => '/finance/bill',
                    'depositClass'    => 'hipanel\modules\finance\merchant\Deposit',
                    'collectionClass' => 'hipanel\modules\finance\merchant\Collection',
                ],
            ],<commit_msg>Changed cartChange event handler name (CartCalculation -> CartCalculator)<commit_after><?php

/*
 * Finance Plugin for HiPanel
 *
 * @link      https://github.com/hiqdev/hipanel-module-finance
 * @package   hipanel-module-finance
 * @license   BSD-3-Clause
 * @copyright Copyright (c) 2014-2015, HiQDev (http://hiqdev.com/)
 */

namespace hipanel\modules\finance;

use hipanel\modules\finance\models\Merchant;
use Yii;

class Plugin extends \hiqdev\pluginmanager\Plugin
{
    public function items()
    {
        return [
            'aliases' => [
                '@bill'   => '/finance/bill',
                '@purse'  => '/finance/purse',
                '@tariff' => '/finance/tariff',
                '@pay'    => '/merchant/pay',
                '@cart'   => '/cart/cart',
            ],
            'menus' => [
                'hipanel\modules\finance\SidebarMenu',
            ],
            'modules' => [
                'finance' => [
                    'class' => 'hipanel\modules\finance\Module',
                ],
                'cart' => [
                    'class'          => 'hiqdev\yii2\cart\Module',
                    'termsPage'      => Yii::$app->params['orgUrl'] . 'rules',
                    'orderPage'      => '/finance/cart/select',
                    /*'orderButton'    => function ($module) {
                        return Yii::$app->getView()->render('@hipanel/modules/finance/views/cart/order-button', [
                            'module' => $module,
                        ]);
                    },*/
                    'paymentMethods' => function () {
                        return Yii::$app->getView()->render('@hipanel/modules/finance/views/cart/payment-methods', [
                            'merchants' => Yii::$app->getModule('merchant')->getCollection([])->getItems(),
                        ]);
                    },
                    'shoppingCartOptions' => [
                        'on cartChange' => ['hipanel\modules\finance\cart\CartCalculator', 'execute']
                    ],
                ],
                'merchant' => [
                    'class'           => 'hiqdev\yii2\merchant\Module',
                    'notifyPage'      => '/finance/pay/notify',
                    'finishPage'      => '/finance/bill',
                    'depositClass'    => 'hipanel\modules\finance\merchant\Deposit',
                    'collectionClass' => 'hipanel\modules\finance\merchant\Collection',
                ],
            ],
{'fraction_non_alphanumeric': 0.15369059656218403, 'fraction_numerical': 0.004448938321536906, 'mean_word_length': 1.3101354507239609, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 72, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5663057', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1353, 'n_words': 176}