ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilSubmitButton.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once "Services/UIComponent/Button/classes/class.ilButtonBase.php";
5 
14 {
15  protected $cmd; // [string]
16 
17  public static function getInstance()
18  {
19  return new self(self::TYPE_SUBMIT);
20  }
21 
22 
23  //
24  // properties
25  //
26 
32  public function setCommand($a_value)
33  {
34  $this->cmd = trim($a_value);
35  }
36 
42  public function getCommand()
43  {
44  return $this->cmd;
45  }
46 
47 
48  //
49  // render
50  //
51 
52  public function render()
53  {
54  $this->prepareRender();
55 
56  $attr = array();
57  $attr["type"] = "submit";
58  $attr["name"] = "cmd[" . $this->getCommand() . "]";
59  $attr["value"] = $this->getCaption();
60 
61  return '<input' . $this->renderAttributes($attr) . ' />';
62  }
63 }
getCommand()
Get submit command.
getCaption($a_translate=true)
Get caption.
prepareRender()
Prepare render.
setCommand($a_value)
Set submit command.
renderAttributes(array $a_additional_attr=null)
Render current HTML attributes.