| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function actions() |
||
| 15 | { |
||
| 16 | return [ |
||
| 17 | 'index' => [ |
||
| 18 | 'class' => IndexAction::class, |
||
| 19 | ], |
||
| 20 | 'view' => [ |
||
| 21 | 'class' => ViewAction::class, |
||
| 22 | 'data' => function ($action) { |
||
| 23 | $sale = $action->model; |
||
| 24 | $attributes = [ |
||
| 25 | 'id' => $sale->buyer_id, |
||
| 26 | 'login' => $sale->buyer, |
||
| 27 | 'seller' => $sale->seller, |
||
| 28 | 'seller_id' => $sale->seller_id, |
||
| 29 | ]; |
||
| 30 | $client = new ClientRelationFreeStub($attributes); |
||
| 31 | $tariff = Tariff::find()->where(['id' => $sale->tariff_id])->one(); |
||
| 32 | |||
| 33 | return compact('client', 'tariff'); |
||
| 34 | }, |
||
| 35 | ], |
||
| 36 | ]; |
||
| 37 | } |
||
| 38 | } |
||
| 39 |