forked from koala-framework/koala-framework
/
Component.php
27 lines (24 loc) · 831 Bytes
/
Component.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
class Kwc_Events_Detail_Component extends Kwc_News_Detail_Abstract_Component
{
public static function getSettings()
{
$ret = parent::getSettings();
$ret['assetsAdmin']['dep'][] = 'KwfFormDateTimeField';
return $ret;
}
public function getTemplateVars()
{
$ret = Kwc_Directories_Item_Detail_Component::getTemplateVars();
$ret['title'] = $this->getData()->row->title;
$ret['start_date'] = $this->getData()->row->start_date;
$ret['end_date'] = $this->getData()->row->end_date;
return $ret;
}
public static function modifyItemData(Kwf_Component_Data $new)
{
Kwc_Directories_Item_Detail_Component::modifyItemData($new);
$new->start_date = $new->row->start_date;
$new->end_date = $new->row->end_date;
}
}