Skip to content
This repository was archived by the owner on Sep 8, 2019. It is now read-only.

Buttons

Lubomir Andrisek edited this page Apr 18, 2019 · 1 revision

Add Button
$mymyButton = new MyButtons implements Impala\IButton;
$this->builder->button($myButton);
IButton::getButtons
Should return array wiht component values, Impala will run action MyListener:push on given button.
IButton::push
Will be run on given button. Return array with keys rows, pages and optional message. Key pages hold valid integer of float number which will increase (if positive), decrease (if negative) sum of pages or do nothing (if zero given). If message is given, it will not proceed and return only alert message.
Examples
    public function getButtons(): array {
    return ['submit' => ['className' => 'btn btn-default',
        'label' => $this->translatorModel->translate('approve choice'),
        'width' => '0']];
}

Clone this wiki locally