@@ 495-504 (lines=10) @@ | ||
492 | * The button names to insert before that button |
|
493 | * @return bool True if insertion occured, false if it did not (because the given button name was not found) |
|
494 | */ |
|
495 | public function insertButtonsBefore($before, $buttons) |
|
496 | { |
|
497 | if (func_num_args() > 2) { |
|
498 | $buttons = func_get_args(); |
|
499 | array_shift($buttons); |
|
500 | } |
|
501 | if (!is_array($buttons)) { |
|
502 | $buttons = [$buttons]; |
|
503 | } |
|
504 | return $this->modifyButtons($before, 0, 0, $buttons); |
|
505 | } |
|
506 | ||
507 | /** |
|
@@ 514-523 (lines=10) @@ | ||
511 | * The button names to insert after that button |
|
512 | * @return bool True if insertion occured, false if it did not (because the given button name was not found) |
|
513 | */ |
|
514 | public function insertButtonsAfter($after, $buttons) |
|
515 | { |
|
516 | if (func_num_args() > 2) { |
|
517 | $buttons = func_get_args(); |
|
518 | array_shift($buttons); |
|
519 | } |
|
520 | if (!is_array($buttons)) { |
|
521 | $buttons = [$buttons]; |
|
522 | } |
|
523 | return $this->modifyButtons($after, 1, 0, $buttons); |
|
524 | } |
|
525 | ||
526 | /** |
|
@@ 530-540 (lines=11) @@ | ||
527 | * Remove the first occurance of buttons |
|
528 | * @param string $buttons,... one or more strings - the name of the buttons to remove |
|
529 | */ |
|
530 | public function removeButtons($buttons) |
|
531 | { |
|
532 | if (func_num_args() > 1) { |
|
533 | $buttons = func_get_args(); |
|
534 | } |
|
535 | if (!is_array($buttons)) { |
|
536 | $buttons = [$buttons]; |
|
537 | } |
|
538 | foreach ($buttons as $button) { |
|
539 | $this->modifyButtons($button, 0, 1); |
|
540 | } |
|
541 | } |
|
542 | ||
543 | /** |