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
210 sprintf(
"Please pass a value of type 'boolean' to specify whether the form is not to be validated when it is submitted")
237 if(!in_array(
$form_target, self::getValidFormTargets()))
241 "Invalid form target passed, must be one of these: %s",
242 implode(
', ', self::getValidFormTargets())
267 if(!in_array(
$form_method, self::getValidFormMethods()))
271 "Invalid form method passed, must be one of these: %s",
272 implode(
', ', self::getValidFormMethods())
301 "Invalid form enc type passed, must be one of these: %s",
302 implode(
', ', self::getValidFormEncTypes())
331 sprintf(
"The form action must be of type 'string'")
359 if(!is_string(
$form))
362 sprintf(
"The form id must be of type 'string'")
389 sprintf(
"The initial value of the button must be of type 'string'")
414 if(!is_string(
$name))
417 sprintf(
"The name of the button must be of type 'string'")
421 $this->name = $is_command ?
'cmd[' .
$name .
']' :
$name;
440 if(!in_array(
$button_type, self::getValidButtonTypes()))
444 "Invalid button type passed, must be one of these: %s",
445 implode(
', ', self::getValidButtonTypes())
464 $attr[
'name'] = $this->
getName();
466 $attr[
'form'] = $this->
getForm();
474 $attr[
'rel'] =
'noopener';
Create styles array
The data for the language used.