1 | <?php namespace Arcanesoft\Tracker\ViewComposers\Dashboard; |
||
14 | class LanguagesListComposer extends AbstractViewComposer |
||
15 | { |
||
16 | /* ------------------------------------------------------------------------------------------------ |
||
17 | | Constants |
||
18 | | ------------------------------------------------------------------------------------------------ |
||
19 | */ |
||
20 | const VIEW = 'tracker::foundation._composers.dashboard.languages-ratio-list'; |
||
21 | |||
22 | /* ------------------------------------------------------------------------------------------------ |
||
23 | | Main Functions |
||
24 | | ------------------------------------------------------------------------------------------------ |
||
25 | */ |
||
26 | /** |
||
27 | * Compose the view. |
||
28 | * |
||
29 | * @param \Illuminate\Contracts\View\View $view |
||
30 | */ |
||
31 | public function compose(View $view) |
||
44 | |||
45 | /* ------------------------------------------------------------------------------------------------ |
||
46 | | Other Functions |
||
47 | | ------------------------------------------------------------------------------------------------ |
||
48 | */ |
||
49 | /** |
||
50 | * Get the languages count from sessions. |
||
51 | * |
||
52 | * @param \Carbon\Carbon $start |
||
53 | * @param \Carbon\Carbon $end |
||
54 | * |
||
55 | * @return \Illuminate\Support\Collection |
||
56 | */ |
||
57 | private function getLanguagesCountFromSessions($start, $end) |
||
75 | |||
76 | /** |
||
77 | * Calculate the languages percentage. |
||
78 | * |
||
79 | * @param \Illuminate\Support\Collection $languages |
||
80 | * |
||
81 | * @return \Illuminate\Support\Collection $languages |
||
82 | */ |
||
83 | private function calculateLanguagesPercentage($languages) |
||
93 | } |
||
94 |