frontend\models\CreateOrderForm::__construct PHP Méthode

__construct() public méthode

public __construct ( $id, $config = [] )
    public function __construct($id, $config = [])
    {
        $this->_store = Store::findOne($id);
        if (!$this->_store) {
            throw new InvalidParamException('未找到该店铺!');
        }
        if ($this->_store->status === Store::STATUS_DISABLED) {
            throw new InvalidParamException('该店铺已禁用!');
        }
        parent::__construct($config);
    }