Passed
Push — master ( 648548...5e4c5e )
by Bruno
08:25
created

Framework::viewableCompose()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 3
dl 0
loc 3
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Formularium\Frontend\Bootstrapvue;
4
5
use Formularium\HTMLNode;
6
7
class Framework extends \Formularium\Framework
8
{
9
    public function __construct(string $name = 'Bootstrapvue')
10
    {
11
        parent::__construct($name);
12
    }
13
14
    public function htmlHead(HTMLNode &$head)
15
    {
16
        $head->appendContent(
17
            HTMLNode::factory('meta', ['name' => "viewport", 'content' => "width=device-width, initial-scale=1, shrink-to-fit=no"])
18
        )->appendContent(
19
            HTMLNode::factory(
20
                'link',
21
                [
22
                    'rel' => "stylesheet",
23
                    'href' => "https://unpkg.com/bootstrap/dist/css/bootstrap.min.css",
24
                ]
25
            )
26
        )->appendContent(
27
            HTMLNode::factory(
28
                'link',
29
                [
30
                    'rel' => "stylesheet",
31
                    'href' => "https://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css",
32
                ]
33
            )
34
        )->appendContent(
35
            HTMLNode::factory(
36
                'script',
37
                [
38
                    'src' => "https://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.js",
39
                ]
40
            )
41
        )->appendContent(
42
            HTMLNode::factory(
43
                'link',
44
                [
45
                    'rel' => "stylesheet",
46
                    'href' => "https://use.fontawesome.com/releases/v5.2.0/css/all.css",
47
                ]
48
            )
49
        );
50
    }
51
52
    public function viewableCompose(\Formularium\Model $m, array $elements, string $previousCompose): string
53
    {
54
        return $previousCompose;
55
    }
56
57
    public function editableCompose(\Formularium\Model $m, array $elements, string $previousCompose): string
58
    {
59
        return $previousCompose;
60
    }
61
}
62