ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSubmitButton.php
Go to the documentation of this file.
1<?php
2
26{
27 protected string $cmd = "";
28
29 public static function getInstance(): self
30 {
31 return new self(self::TYPE_SUBMIT);
32 }
33
34
35 //
36 // properties
37 //
38
42 public function setCommand(string $a_value): void
43 {
44 $this->cmd = trim($a_value);
45 }
46
47 public function getCommand(): string
48 {
49 return $this->cmd;
50 }
51
52
53 //
54 // render
55 //
56
57 public function render(): string
58 {
59 $this->prepareRender();
60
61 $attr = array();
62 $attr["type"] = "submit";
63 $attr["name"] = "cmd[" . $this->getCommand() . "]";
64 $attr["value"] = $this->getCaption();
65
66 return '<input' . $this->renderAttributes($attr) . ' />';
67 }
68}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getCaption(bool $a_translate=true)
renderAttributes(?array $a_additional_attr=null)
Render current HTML attributes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setCommand(string $a_value)
Set submit command.