CartHistory::prepareVars()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Bedard\Shop\FormWidgets;
2
3
use Backend\Classes\FormWidgetBase;
4
5
/**
6
 * CartHistory Form Widget.
7
 */
8
class CartHistory extends FormWidgetBase
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    protected $defaultAlias = 'bedard_shop_cart_history';
14
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function render()
19
    {
20
        $this->prepareVars();
21
22
        return $this->makePartial('carthistory');
23
    }
24
25
    /**
26
     * Prepares the form widget view data.
27
     */
28
    public function prepareVars()
29
    {
30
        $this->vars['statuses'] = $this->model->statuses;
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function loadAssets()
37
    {
38
        $this->addJs('/plugins/bedard/shop/assets/dist/vendor.min.js', 'Bedard.Shop');
39
        $this->addJs('/plugins/bedard/shop/assets/dist/cart_history.min.js', 'Bedard.Shop');
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function getSaveValue($value)
46
    {
47
        return $value;
48
    }
49
}
50