| @@ 54-63 (lines=10) @@ | ||
| 51 | * @param string $url |
|
| 52 | * @param array $options |
|
| 53 | */ |
|
| 54 | public static function link($title, $url, array $options = []) |
|
| 55 | { |
|
| 56 | $toolbar = Toolbar::getInstance(self::$_toolbar); |
|
| 57 | $options += [ |
|
| 58 | 'icon' => 'link', |
|
| 59 | 'button' => 'grey lighten-3' |
|
| 60 | ]; |
|
| 61 | ||
| 62 | $toolbar->appendButton('Core.link', $title, $url, $options); |
|
| 63 | } |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Create add link. |
|
| @@ 73-82 (lines=10) @@ | ||
| 70 | * @param string $icon |
|
| 71 | * @param array $options |
|
| 72 | */ |
|
| 73 | public static function add($title = null, $url = ['action' => 'add'], $icon = 'plus', array $options = []) |
|
| 74 | { |
|
| 75 | $toolbar = Toolbar::getInstance(self::$_toolbar); |
|
| 76 | $options += [ |
|
| 77 | 'icon' => $icon, |
|
| 78 | 'button' => 'green lighten-2' |
|
| 79 | ]; |
|
| 80 | ||
| 81 | $toolbar->appendButton('Core.link', $title, $url, $options); |
|
| 82 | } |
|
| 83 | ||
| 84 | /** |
|
| 85 | * Delete for process form. |
|