Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include yii\base\Event into SaleEvent #1075

Closed
Anubarak opened this issue Oct 24, 2019 · 0 comments
Closed

Include yii\base\Event into SaleEvent #1075

Anubarak opened this issue Oct 24, 2019 · 0 comments

Comments

@Anubarak
Copy link

Description

Could you please include yii\base\Event or create a class craft\commerce\events\Events so using your new events won't throw an exception?
Currently the following Error is thrown

Error
Class 'craft\commerce\events\Event' not found
<?php
/**
 * @link https://craftcms.com/
 * @copyright Copyright (c) Pixel & Tonic, Inc.
 * @license https://craftcms.github.io/license/
 */
namespace craft\commerce\events;
/**
 * Class SaleEvent
 *
 * @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
 * @since 2.2
 */
class SaleEvent extends Event // <----- Event not defined
{
    // Properties
    // ==========================================================================
    /**
     * @var Sale sale
     */
    public $sale;
    /**
     * @var bool Whether the sale is brand new
     */
    public $isNew = false;
}

Additional info

  • Commerce version: 2.2.2
@Anubarak Anubarak changed the title Include yii\base\Event into SaleEvent and DiscountEvent Include yii\base\Event into SaleEvent Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant