| @@ 47-56 (lines=10) @@ | ||
| 44 | * @param array $options |
|
| 45 | * @return void |
|
| 46 | */ |
|
| 47 | public static function add($title = null, $url = ['action' => 'add'], $icon = 'plus', array $options = []) |
|
| 48 | { |
|
| 49 | $toolbar = Toolbar::getInstance(self::$_toolbar); |
|
| 50 | $options += [ |
|
| 51 | 'icon' => $icon, |
|
| 52 | 'button' => 'green lighten-2' |
|
| 53 | ]; |
|
| 54 | ||
| 55 | $toolbar->appendButton('Core.link', $title, $url, $options); |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * Cancel form button. |
|
| @@ 105-114 (lines=10) @@ | ||
| 102 | * @param string|array $url |
|
| 103 | * @param array $options |
|
| 104 | */ |
|
| 105 | public static function link($title, $url, array $options = []) |
|
| 106 | { |
|
| 107 | $toolbar = Toolbar::getInstance(self::$_toolbar); |
|
| 108 | $options += [ |
|
| 109 | 'icon' => 'link', |
|
| 110 | 'button' => 'grey lighten-3' |
|
| 111 | ]; |
|
| 112 | ||
| 113 | $toolbar->appendButton('Core.link', $title, $url, $options); |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * Save form button. |
|