ILIAS
release_8 Revision v8.19
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
isFormNovalidate () | |
setFormNovalidate (bool $form_novalidate) | |
If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. More... | |
getFormTarget () | |
setFormTarget (string $form_target) | |
If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. More... | |
getFormMethod () | |
setFormMethod (string $form_method) | |
If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form. More... | |
getFormEncType () | |
setFormEncType (string $form_enc_type) | |
If this attribute is specified, it overrides the enctype attribute of the button's form owner. More... | |
getFormAction () | |
setFormAction (string $form_action) | |
The URI of a program that processes the information submitted by the button. More... | |
getForm () | |
setForm (string $form) | |
The form element that the button is associated with (its form owner). More... | |
getValue () | |
setValue (string $value) | |
The initial value of the button. More... | |
getName () | |
setName (string $name, bool $is_command=true) | |
The name of the button, which is submitted with the form data. More... | |
getButtonType () | |
setButtonType (string $button_type) | |
render () | |
![]() | |
__clone () | |
getType () | |
setId (?string $a_value) | |
getId () | |
setCaption (string $a_value, bool $a_is_lng_id=true) | |
getCaption (bool $a_translate=true) | |
setPrimary (bool $a_value) | |
isPrimary () | |
setOmitPreventDoubleSubmission (bool $a_value) | |
Toggle double submission prevention status. More... | |
getOmitPreventDoubleSubmission () | |
setOnClick (string $a_value) | |
getOnClick () | |
setDisabled (bool $a_value) | |
isDisabled () | |
addCSSClass (string $a_value) | |
getCSSClasses () | |
applyDefaultCss (?bool $apply_default_css=null) | |
render () | |
getToolbarHTML () | |
Get input item HTML to be inserted into ilToolbarGUI. More... | |
Static Public Member Functions | |
static | getInstance () |
static | getValidFormTargets () |
static | getValidFormMethods () |
static | getValidFormEncTypes () |
static | getValidButtonTypes () |
![]() | |
static | getInstance () |
Data Fields | |
const | BUTTON_TYPE_BUTTON = 'button' |
The button has no default behavior. More... | |
const | BUTTON_TYPE_SUBMIT = 'submit' |
The button submits the form data to the server. More... | |
const | BUTTON_TYPE_RESET = 'reset' |
The button resets all the controls to their initial values. More... | |
const | FORM_ENC_TYPE_APPLICATION = 'application/x-www-form-urlencoded' |
The default value if the attribute is not specified. More... | |
const | FORM_ENC_TYPE_MULTI_PART = 'multipart/form-data' |
Use this value if you are using an <input> element with the type attribute set to file. More... | |
const | FORM_ENC_TYPE_PLAIN = 'text/plain' |
const | FORM_METHOD_POST = 'POST' |
const | FORM_METHOD_GET = 'GET' |
const | FORM_TARGET_SELF = '_self' |
Load the response into the same browsing context as the current one. More... | |
const | FORM_TARGET_BLANK = '_blank' |
Load the response into a new unnamed browsing context. More... | |
const | FORM_TARGET_PARENT = '_parent' |
Load the response into the parent browsing context of the current one. More... | |
const | FORM_TARGET_TOP = '_top' |
Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). More... | |
![]() | |
const | TYPE_SUBMIT = 1 |
const | TYPE_LINK = 2 |
const | TYPE_SPLIT = 3 |
const | TYPE_BUTTON = 4 |
Protected Attributes | |
string | $button_type = self::BUTTON_TYPE_SUBMIT |
string | $name = null |
string | $value = null |
string | $form = null |
string | $form_action = null |
string | $form_enc_type = null |
string | $form_method = null |
string | $form_target = null |
bool | $form_novalidate = false |
![]() | |
ilLanguage | $lng |
int | $type = 0 |
string | $id = "" |
string | $caption = "" |
bool | $caption_is_lng_id = false |
bool | $primary = false |
bool | $omit_prevent_double_submission = false |
string | $onclick = "" |
int | $acc_key = 0 |
bool | $disabled = false |
array | $css = array() |
bool | $apply_default_css = true |
Additional Inherited Members | |
![]() | |
__construct (int $a_type) | |
setType (int $a_value) | |
gatherCssClasses () | |
renderAttributesHelper (array $a_attr) | |
renderAttributes (array $a_additional_attr=null) | |
Render current HTML attributes. More... | |
prepareRender () | |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Description: <button> (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button) by Mozilla Contributors is licensed under CC-BY-SA 2.5.
Definition at line 24 of file class.ilButton.php.
ilButton::getButtonType | ( | ) |
Definition at line 319 of file class.ilButton.php.
References $button_type.
Referenced by render().
ilButton::getForm | ( | ) |
Definition at line 251 of file class.ilButton.php.
References $form.
Referenced by render().
ilButton::getFormAction | ( | ) |
Definition at line 229 of file class.ilButton.php.
References $form_action.
Referenced by render().
ilButton::getFormEncType | ( | ) |
Definition at line 205 of file class.ilButton.php.
References $form_enc_type.
Referenced by render().
ilButton::getFormMethod | ( | ) |
Definition at line 181 of file class.ilButton.php.
References $form_method.
Referenced by render().
ilButton::getFormTarget | ( | ) |
Definition at line 154 of file class.ilButton.php.
References $form_target.
Referenced by render().
|
static |
Definition at line 91 of file class.ilButton.php.
Referenced by ilMailFormGUI\showForm(), and ilContainerGUI\showPasswordInstructionObject().
ilButton::getName | ( | ) |
Definition at line 297 of file class.ilButton.php.
References $name.
Referenced by ilJsLinkButton\render(), and render().
|
static |
Definition at line 123 of file class.ilButton.php.
|
static |
Definition at line 114 of file class.ilButton.php.
|
static |
Definition at line 106 of file class.ilButton.php.
|
static |
Definition at line 96 of file class.ilButton.php.
ilButton::getValue | ( | ) |
Definition at line 276 of file class.ilButton.php.
References $value.
Referenced by render().
ilButton::isFormNovalidate | ( | ) |
Definition at line 132 of file class.ilButton.php.
References $form_novalidate.
Referenced by render().
ilButton::render | ( | ) |
Definition at line 342 of file class.ilButton.php.
References getButtonType(), ilButtonBase\getCaption(), getForm(), getFormAction(), getFormEncType(), getFormMethod(), getFormTarget(), getName(), getValue(), isFormNovalidate(), ilButtonBase\prepareRender(), and ilButtonBase\renderAttributes().
ilButton::setButtonType | ( | string | $button_type | ) |
InvalidArgumentException |
Definition at line 327 of file class.ilButton.php.
References $button_type.
ilButton::setForm | ( | string | $form | ) |
The form element that the button is associated with (its form owner).
The value of the attribute must be the id attribute of a <form> element in the same document. If this attribute is not specified, the <button> element must be a descendant of a form element. This attribute enables you to place <button> elements anywhere within a document, not just as descendants of their <form> elements.
InvalidArgumentException |
Definition at line 264 of file class.ilButton.php.
References $form, and ILIAS\Repository\form().
ilButton::setFormAction | ( | string | $form_action | ) |
The URI of a program that processes the information submitted by the button.
If specified, it overrides the action attribute of the button's form owner.
InvalidArgumentException |
Definition at line 239 of file class.ilButton.php.
References $form_action.
ilButton::setFormEncType | ( | string | $form_enc_type | ) |
If this attribute is specified, it overrides the enctype attribute of the button's form owner.
InvalidArgumentException |
Definition at line 214 of file class.ilButton.php.
References $form_enc_type.
ilButton::setFormMethod | ( | string | $form_method | ) |
If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form.
InvalidArgumentException |
Definition at line 190 of file class.ilButton.php.
References $form_method.
ilButton::setFormNovalidate | ( | bool | $form_novalidate | ) |
If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted.
If this attribute is specified, it overrides the novalidate attribute of the button's form owner.
InvalidArgumentException |
Definition at line 142 of file class.ilButton.php.
References $form_novalidate.
ilButton::setFormTarget | ( | string | $form_target | ) |
If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form.
This is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame). If this attribute is specified, it overrides the target attribute of the button's form owner.
InvalidArgumentException |
Definition at line 166 of file class.ilButton.php.
References $form_target.
ilButton::setName | ( | string | $name, |
bool | $is_command = true |
||
) |
The name of the button, which is submitted with the form data.
bool | $is_command | if true, a cmd[] is wrapped around the passed name |
InvalidArgumentException |
Definition at line 307 of file class.ilButton.php.
References $name.
ilButton::setValue | ( | string | $value | ) |
The initial value of the button.
InvalidArgumentException |
Definition at line 285 of file class.ilButton.php.
References $value.
|
protected |
Definition at line 81 of file class.ilButton.php.
Referenced by getButtonType(), and setButtonType().
|
protected |
Definition at line 84 of file class.ilButton.php.
|
protected |
Definition at line 85 of file class.ilButton.php.
Referenced by getFormAction(), and setFormAction().
|
protected |
Definition at line 86 of file class.ilButton.php.
Referenced by getFormEncType(), and setFormEncType().
|
protected |
Definition at line 87 of file class.ilButton.php.
Referenced by getFormMethod(), and setFormMethod().
|
protected |
Definition at line 89 of file class.ilButton.php.
Referenced by isFormNovalidate(), and setFormNovalidate().
|
protected |
Definition at line 88 of file class.ilButton.php.
Referenced by getFormTarget(), and setFormTarget().
|
protected |
Definition at line 82 of file class.ilButton.php.
|
protected |
Definition at line 83 of file class.ilButton.php.
Referenced by getValue(), and setValue().
const ilButton::BUTTON_TYPE_BUTTON = 'button' |
The button has no default behavior.
It can have client-side scripts associated with the element's events, which are triggered when the events occur.
Definition at line 30 of file class.ilButton.php.
const ilButton::BUTTON_TYPE_RESET = 'reset' |
The button resets all the controls to their initial values.
Definition at line 41 of file class.ilButton.php.
const ilButton::BUTTON_TYPE_SUBMIT = 'submit' |
The button submits the form data to the server.
This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.
Definition at line 36 of file class.ilButton.php.
Referenced by ilMailFormGUI\showForm().
const ilButton::FORM_ENC_TYPE_APPLICATION = 'application/x-www-form-urlencoded' |
The default value if the attribute is not specified.
Definition at line 46 of file class.ilButton.php.
const ilButton::FORM_ENC_TYPE_MULTI_PART = 'multipart/form-data' |
Use this value if you are using an <input> element with the type attribute set to file.
Definition at line 51 of file class.ilButton.php.
const ilButton::FORM_ENC_TYPE_PLAIN = 'text/plain' |
Definition at line 53 of file class.ilButton.php.
const ilButton::FORM_METHOD_GET = 'GET' |
Definition at line 55 of file class.ilButton.php.
const ilButton::FORM_METHOD_POST = 'POST' |
Definition at line 54 of file class.ilButton.php.
const ilButton::FORM_TARGET_BLANK = '_blank' |
Load the response into a new unnamed browsing context.
Definition at line 66 of file class.ilButton.php.
Referenced by ilTestSubmissionReviewGUI\buildToolbar().
const ilButton::FORM_TARGET_PARENT = '_parent' |
Load the response into the parent browsing context of the current one.
If there is no parent, this option behaves the same way as self::FORM_TARGET_SELF.
Definition at line 72 of file class.ilButton.php.
const ilButton::FORM_TARGET_SELF = '_self' |
Load the response into the same browsing context as the current one.
This value is the default if the attribute is not specified.
Definition at line 61 of file class.ilButton.php.
const ilButton::FORM_TARGET_TOP = '_top' |
Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent).
If there is no parent, this option behaves the same way as self::FORM_TARGET_SELF.
Definition at line 79 of file class.ilButton.php.