FRED™
3.0
FRED™: Framework for Rapid and Easy Development
DateTime.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Rsi\Fred\Controller\Widget\Group
;
4
5
use
Rsi\Fred\Controller\Widget
;
6
7
class
DateTime
extends
\Rsi\Fred\Controller\Widget\Group{
8
9
protected
function
init
(){
10
$config = [self::DISPLAY =>
$this->display
,self::RIGHT => $this->right];
11
$this->_config += [
12
self::WIDGETS => [
13
'date'
=>
new
Widget\Date($config + [self::MIN => $this->min,self::MAX => $this->max]),
14
'time'
=>
new
Widget\Time($config)
15
],
16
self::VALUE_GLUE =>
' '
,
17
self::FORMAT =>
'[date] [time]'
18
];
19
parent::init();
20
}
21
22
public
function
clientConfig
(){
23
$this->
getWidgets
();
24
$this->_widgets[
'time'
]->date = $this->
id
.
'__date'
;
25
return
parent::clientConfig();
26
}
27
28
public
function
dataConvert
($value){
29
return
$value && $value[
'date'
] && $value[
'time'
] ? $value[
'date'
] . $this->valueGlue . $value[
'time'
]->format(
'H:i:s'
) : null;
30
}
31
32
}
Rsi\Fred\Controller\Widget
Definition:
Char.php:3
Rsi\Fred\Controller\Widget\getWidgets
getWidgets()
Definition:
Widget.php:379
Rsi\Fred\Controller\Widget\Group\DateTime
Definition:
DateTime.php:7
Rsi\Fred\Controller\Widget\Group\DateTime\clientConfig
clientConfig()
Definition:
DateTime.php:22
Rsi\Fred\Controller\$display
$display
Default display mode for widgets.
Definition:
Controller.php:24
Rsi\Fred\Controller\Widget\Group\DateTime\init
init()
Definition:
DateTime.php:9
Rsi\Fred\Controller\Widget\Group
Definition:
DateTime.php:3
Rsi\Fred\Controller\Widget\Group\DateTime\dataConvert
dataConvert($value)
Definition:
DateTime.php:28
src
Rsi
Fred
Controller
Widget
Group
DateTime.php
Generated on Sun Aug 2 2020 19:43:57 for FRED™ by
1.8.13