• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

heimrichhannot / contao-utils-bundle / 11854178157

15 Nov 2024 10:01AM UTC coverage: 23.081% (-0.2%) from 23.297%
11854178157

push

github

koertho
add backend wizard ui with popup wizard method

0 of 53 new or added lines in 2 files covered. (0.0%)

1320 of 5719 relevant lines covered (23.08%)

1.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Util/Ui/PopupWizardLinkOptions.php
1
<?php
2

3
namespace HeimrichHannot\UtilsBundle\Util\Ui;
4

5
class PopupWizardLinkOptions
6
{
7
    /** @var string The route to generate the link */
8
    public string $route = 'contao_backend';
9
    /** @var bool If only the url should be returned instead of a complete link element */
10
    public bool $urlOnly = false;
11
    /** @var string The title of the link */
12
    public string $title = '';
13
    /** @var string Override the default css style properties */
14
    public string $style = 'padding-left: 5px; padding-top: 2px; display: inline-block;';
15
    /**  *@var array Additional Link attributes as key value pairs. Will override title and style option. href is not allowed and will be removed from list. */
16
    public array $attributes = [];
17
    /** @var string Link icon to show as link text. Overrides default icon. */
18
    public string $icon = 'alias.svg';
19
    /** @var string A linkTitle to show as link text. Will be displayed after the link icon. Default empty. */
20
    public string $linkText = '';
21
    /** @var int The width of the popup */
22
    public int $width = 991;
23
    /** @var string The title of the popup */
24
    public string $popupTitle = '';
25

26
    public function __construct()
27
    {
NEW
28
    }
×
29

30
    /**
31
     * Set the route to generate the link.
32
     */
33
    public function setRoute(string $route): PopupWizardLinkOptions
34
    {
NEW
35
        $this->route = $route;
×
NEW
36
        return $this;
×
37
    }
38

39
    /**
40
     * If only the url should be returned instead of a complete link element.
41
     */
42
    public function setUrlOnly(bool $urlOnly): PopupWizardLinkOptions
43
    {
NEW
44
        $this->urlOnly = $urlOnly;
×
NEW
45
        return $this;
×
46
    }
47

48
    /**
49
     * Set the title of the link.
50
     */
51
    public function setTitle(string $title): PopupWizardLinkOptions
52
    {
NEW
53
        $this->title = $title;
×
NEW
54
        return $this;
×
55
    }
56

57
    /**
58
     * Override the default css style properties.
59
     */
60
    public function setStyle(string $style): PopupWizardLinkOptions
61
    {
NEW
62
        $this->style = $style;
×
NEW
63
        return $this;
×
64
    }
65

66
    /**
67
     * Set additional link attributes as key value pairs. Will override title and style option. href and onclick are not allowed and will be removed from list.
68
     */
69
    public function setAttributes(array $attributes): PopupWizardLinkOptions
70
    {
NEW
71
        $this->attributes = $attributes;
×
NEW
72
        return $this;
×
73
    }
74

75
    /**
76
     * Add an additional attribute to the link.
77
     */
78
    public function setIcon(string $icon): PopupWizardLinkOptions
79
    {
NEW
80
        $this->icon = $icon;
×
NEW
81
        return $this;
×
82
    }
83

84
    /**
85
     * Override the default link text. Will be displayed after the link icon.
86
     */
87
    public function setLinkText(string $linkText): PopupWizardLinkOptions
88
    {
NEW
89
        $this->linkText = $linkText;
×
NEW
90
        return $this;
×
91
    }
92

93

94
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc