-
Notifications
You must be signed in to change notification settings - Fork 39
/
Component.php
45 lines (43 loc) · 1.68 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
class Kwc_Guestbook_Component extends Kwc_Posts_Directory_Component
{
/**
* Der Post ist erst inaktiv und muss erst freigeschaltet werden
*/
const INACTIVE_ON_SAVE = 'inactive_on_save';
/**
* Der Post ist sofort aktiv und kann später deaktiviert werden
*/
const ACTIVE_ON_SAVE = 'active_on_save';
public static function getSettings($param = null)
{
$ret = parent::getSettings($param);
$ret['componentName'] = trlKwfStatic('Guestbook');
$ret['componentCategory'] = 'admin';
$ret['generators']['detail']['component'] = 'Kwc_Guestbook_Detail_Component';
$ret['generators']['write']['component'] = 'Kwc_Guestbook_Write_Component';
$ret['generators']['mail'] = array(
'class' => 'Kwf_Component_Generator_Page_Static',
'component' => 'Kwc_Guestbook_Mail_Component'
);
$ret['generators']['activate'] = array(
'class' => 'Kwf_Component_Generator_Page_Static',
'component' => 'Kwc_Guestbook_ActivatePost_Component'
);
$ret['generators']['deactivate'] = array(
'class' => 'Kwf_Component_Generator_Page_Static',
'component' => 'Kwc_Guestbook_DeactivatePost_Component'
);
$ret['ownModel'] = 'Kwf_Component_FieldModel';
$ret['extConfig'] = 'Kwc_Guestbook_ExtConfig';
$ret['extConfigControllerIndex'] = 'Kwc_Guestbook_ExtConfigControllerIndex';
$ret['menuConfig'] = 'Kwf_Component_Abstract_MenuConfig_SameClass';
return $ret;
}
public function getSelect()
{
$ret = parent::getSelect();
$ret->order('create_time', 'DESC');
return $ret;
}
}