aboutsummaryrefslogtreecommitdiff
path: root/lib/models/Courseware/BlockTypes/KeyPoint.php
blob: 1da80035919832d736c69c514f45320579125903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
64
65
66
67
68
69
70
<?php

namespace Courseware\BlockTypes;

/**
 * This class represents the content of a Courseware key point block.
 *
 * @author  Ron Lucke <lucke@elan-ev.de>
 * @license GPL2 or any later version
 *
 * @since   Stud.IP 5.0
 */
class KeyPoint extends BlockType
{
    public static function getType(): string
    {
        return 'key-point';
    }

    public static function getTitle(): string
    {
        return _('Merksatz');
    }

    public static function getDescription(): string
    {
        return _('Erzeugt einen Merksatz mit Icon und Rahmen.');
    }

    public function initialPayload(): array
    {
        return [
            'text' => 'Merksatz',
            'icon' => 'courseware',
            'color' => 'studip-blue',
        ];
    }

    public static function getJsonSchema(): string
    {
        $schemaFile = __DIR__.'/KeyPoint.json';

        return file_get_contents($schemaFile);
    }

    public static function getCategories(): array
    {
        return ['text', 'layout'];
    }

    public static function getContentTypes(): array
    {
        return ['text'];
    }

    public static function getFileTypes(): array
    {
        return [];
    }

    public static function getTags(): array
    {
        return [
            _('Merksatz'), _('Eselsbrücke'), _('Zusammenfassung'), _('Hinweis'), _('Tipp'),
            _('Warnung'), _('Definition'), _('Motto'), _('Fazit'), _('merken'), _('Icon'),
            _('Rahmen'), _('hervorheben'), _('Gestaltung'), _('Dekoration'),
            _('Illustration'), _('Design'), _('Ergebnissicherung'), _('highlighten'), _('Markierung')
        ];
    }
}