forked from drupalcommerce/commerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommerce.module
59 lines (52 loc) · 1.26 KB
/
commerce.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* @file
* Defines the Store entity type and common functions used by Commerce modules.
*/
/**
* Implements hook_theme().
*/
function commerce_theme() {
return array(
'commerce_add_list' => array(
'variables' => array(
'bundles' => array(),
'bundle_type' => NULL,
'form_route_name' => NULL
),
'file' => 'commerce.pages.inc',
'template' => 'commerce-add-list',
),
);
}
/**
* Implements hook_toolbar().
*/
function commerce_toolbar() {
$items = array();
$items['commerce'] = array(
'#type' => 'toolbar_item',
'#attached' => array(
'library' => array(
'commerce/drupal.commerce.toolbar',
),
),
);
return $items;
}
/**
* Returns the e-mail address from which to send commerce related e-mails.
*
* Currently this is just using the site's e-mail address, but this may be
* updated to use a specific e-mail address when we add a settings form for the
* store's physical address and contact information.
*/
function commerce_email_from() {
return \Drupal::config('system.site')->get('mail');
}
/**
* Returns the currency code of the site's default currency.
*/
function commerce_default_currency() {
return \Drupal::config('commerce')->get('default_currency');
}