@@ 48-57 (lines=10) @@ | ||
45 | * @param array $options |
|
46 | * @return void |
|
47 | */ |
|
48 | public static function add($title = null, $url = ['action' => 'add'], $icon = 'plus', array $options = []) |
|
49 | { |
|
50 | $toolbar = Toolbar::getInstance(self::$_toolbar); |
|
51 | $options += [ |
|
52 | 'icon' => $icon, |
|
53 | 'button' => 'green lighten-2' |
|
54 | ]; |
|
55 | ||
56 | $toolbar->appendButton('Core.link', $title, $url, $options); |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * Apply form button. |
|
@@ 124-133 (lines=10) @@ | ||
121 | * @param string|array $url |
|
122 | * @param array $options |
|
123 | */ |
|
124 | public static function link($title, $url, array $options = []) |
|
125 | { |
|
126 | $toolbar = Toolbar::getInstance(self::$_toolbar); |
|
127 | $options += [ |
|
128 | 'icon' => 'link', |
|
129 | 'button' => 'grey lighten-3' |
|
130 | ]; |
|
131 | ||
132 | $toolbar->appendButton('Core.link', $title, $url, $options); |
|
133 | } |
|
134 | ||
135 | /** |
|
136 | * Save form button. |