1 | <?php |
||
2 | /** |
||
3 | * Server module for HiPanel |
||
4 | * |
||
5 | * @link https://github.com/hiqdev/hipanel-module-server |
||
6 | * @package hipanel-module-server |
||
7 | * @license BSD-3-Clause |
||
8 | * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/) |
||
9 | */ |
||
10 | |||
11 | namespace hipanel\modules\server\cart; |
||
12 | |||
13 | /** |
||
14 | * Class RenewCalculation performs calculation for server renewal operation. |
||
15 | */ |
||
16 | class RenewCalculation extends \hipanel\modules\finance\cart\Calculation |
||
17 | { |
||
18 | use \hipanel\base\ModelTrait; |
||
19 | |||
20 | /** {@inheritdoc} */ |
||
21 | public function init() |
||
22 | { |
||
23 | parent::init(); |
||
24 | |||
25 | $this->client = $this->position->getModel()->client; |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
26 | $this->seller = $this->position->getModel()->seller; |
||
0 ignored issues
–
show
|
|||
27 | $this->object = 'server'; |
||
0 ignored issues
–
show
|
|||
28 | } |
||
29 | |||
30 | /** {@inheritdoc} */ |
||
31 | public function rules() |
||
32 | { |
||
33 | return array_merge(parent::rules(), [ |
||
34 | [['server', 'expires'], 'safe'], |
||
35 | [['id'], 'integer'], |
||
36 | ]); |
||
37 | } |
||
38 | } |
||
39 |