4 require_once
'Services/UIComponent/Button/classes/class.ilButtonBase.php';
139 return new self(self::TYPE_BUTTON);
148 self::FORM_TARGET_BLANK,
149 self::FORM_TARGET_PARENT,
150 self::FORM_TARGET_SELF,
151 self::FORM_TARGET_TOP
161 self::FORM_METHOD_POST,
162 self::FORM_METHOD_GET
172 self::FORM_ENC_TYPE_APPLICATION,
173 self::FORM_ENC_TYPE_MULTI_PART,
174 self::FORM_ENC_TYPE_PLAIN
184 self::BUTTON_TYPE_SUBMIT,
185 self::BUTTON_TYPE_BUTTON,
186 self::BUTTON_TYPE_RESET
209 sprintf(
"Please pass a value of type 'boolean' to specify whether the form is not to be validated when it is submitted")
236 if (!in_array(
$form_target, self::getValidFormTargets())) {
239 "Invalid form target passed, must be one of these: %s",
240 implode(
', ', self::getValidFormTargets())
265 if (!in_array(
$form_method, self::getValidFormMethods())) {
268 "Invalid form method passed, must be one of these: %s",
269 implode(
', ', self::getValidFormMethods())
297 "Invalid form enc type passed, must be one of these: %s",
298 implode(
', ', self::getValidFormEncTypes())
326 sprintf(
"The form action must be of type 'string'")
354 if (!is_string(
$form)) {
356 sprintf(
"The form id must be of type 'string'")
382 sprintf(
"The initial value of the button must be of type 'string'")
407 if (!is_string(
$name)) {
409 sprintf(
"The name of the button must be of type 'string'")
413 $this->name = $is_command ?
'cmd[' .
$name .
']' :
$name;
432 if (!in_array(
$button_type, self::getValidButtonTypes())) {
435 "Invalid button type passed, must be one of these: %s",
436 implode(
', ', self::getValidButtonTypes())
455 $attr[
'name'] = $this->
getName();
457 $attr[
'form'] = $this->
getForm();
465 $attr[
'rel'] =
'noopener';