Skip to content

classes_lib_controls_form_button.class

Daniel Spors edited this page Dec 19, 2023 · 3 revisions

Classes in file lib/controls/form/button.class.php

class Button

This is an <input type=button/>.

Extends: Input » Control » Renderable

LinkTo

Creates javascript code to redirect elsewhere on button click.

Definition: public function LinkTo($controller, $method, $data)

Returns: static

Parameters:

  • mixed $controller The controller to be loaded (can be Renderable or string)

  • string $method The method to be executed

  • array|string $data Optional data to be passed

Make

DEPRECATED (2021/05) This hides the parent Make method and should not be used anymore Overrides Control::Make with own logic.

Textual

Button creation shortcut

Definition: public static function Textual($label, $onclick=false)

Returns: Button The new button

Parameters:

  • string $label Label

  • string $onclick OnClick JS code

__construct

Creates a Button. Note that you can safely ignore all but the $label argument if your new button shall not redirect elsewhere on click.

Definition: public function __construct($label, $controller, $event, $data)

Returns: NOT DOCUMENTED

Parameters:

  • string $label Label text

  • string $controller Controller for click redirect

  • string $event Event for click redirect

  • mixed $data Data for click redirect

Clone this wiki locally