Assets.php 2.07 KB
Newer Older
1
2
<?php
/**
3
 * gredu_labs.
4
5
 *
 * @link https://github.com/eellak/gredu_labs for the canonical source repository
6
 *
7
8
9
10
 * @copyright Copyright (c) 2008-2015 Greek Free/Open Source Software Society (https://gfoss.ellak.gr/)
 * @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
 */

11
namespace GrEduLabs\Schools\Action;
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Views\Twig;

class Assets
{
    protected $view;

    public function __construct(Twig $view)
    {
        $this->view = $view;
    }

    public function __invoke(Request $req, Response $res, array $args = [])
    {
28
        return $this->view->render($res, 'schools/assets.twig', [
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
60
61
62
63
            'assets' => [
                [
                    'id'              => 1,
                    'type'            => 1,
                    'typeName'        => 'ΒΙΝΤΕΟΠΡΟΒΟΛΕΑΣ',
                    'lab'             => 1,
                    'labName'         => 'ΕΡΓΑΣΤΗΡΙΟ ΠΛΗΡΟΦ/ΚΗΣ 1',
                    'quantity'        => 2,
                    'acquisitionYear' => '2001',
                    'comments'        => 'test',
                ],
                [
                    'id'              => 2,
                    'type'            => 3,
                    'typeName'        => 'LAPTOP',
                    'lab'             => 2,
                    'labName'         => 'ΕΡΓΑΣΤΗΡΙΟ ΠΛΗΡΟΦ/ΚΗΣ 2',
                    'quantity'        => 1,
                    'acquisitionYear' => '2003',
                    'comments'        => 'test',
                ],
                [
                    'id'              => 3,
                    'type'            => 2,
                    'typeName'        => 'ΠΛΗΚΤΡΟΛΟΓΙΟ',
                    'lab'             => 2,
                    'labName'         => 'ΕΡΓΑΣΤΗΡΙΟ ΠΛΗΡΟΦ/ΚΗΣ 2',
                    'quantity'        => 10,
                    'acquisitionYear' => '2008',
                    'comments'        => 'test',
                ],
            ],
        ]);
    }
}