Source of file HTML5TimeField.php
Size: 0,866 Bytes - Last Modified: 2021-12-23T10:36:36+00:00
/var/www/docs.ssmods.com/process/src/code/HTML5TimeField.php
123456789101112131415161718192021222324252627282930313233343536373839404142 | <?php class HTML5TimeField extends TimeField { private $interval = '600'; public function __construct($name, $title = null, $value = "") { $this->setConfig('timeformat', 'HH:mm:s'); $this->setInterval($this->Config()->interval); parent::__construct($name, $title, $value); } public function getAttributes() { return array_merge( parent::getAttributes(), array( 'type' => 'time', 'step' => $this->interval ) ); } public function setConfig($name, $val) { if ($name == 'timeformat') { $val = 'HH:mm:s'; } $this->config[$name] = $val; return $this; } public function setInterval($iInterval) { $this->interval = $iInterval; return $this; } } |