1 <?php
2 /**
3 * SubmitInput.php
4 *
5 * @author Elvyrra SAS
6 * @license http://rem.mit-license.org/ MIT
7 */
8
9 namespace Hawk;
10
11 /**
12 * This class describes the submit inputs behavior
13 *
14 * @package Form\Input
15 */
16 class SubmitInput extends ButtonInput{
17 const TYPE = "submit";
18
19 const INDEPENDANT = true;
20
21 const NO_LABEL = true;
22
23 /**
24 * Display the input
25 *
26 * @return string The HTML to display
27 */
28 public function display(){
29 $this->class .= " btn-primary";
30 return parent::display();
31 }
32
33 /**
34 * Check the value of the input. This method is overrides the one in FormInput class,
35 * and returns always <b>true</b> because no data can be submitted for this type of input
36 *
37 * @param Form $form The for this input is associated with
38 *
39 * @return boolean True
40 */
41 public function check(&$form = null){
42 return true;
43 }
44 }
45