/
category.php
62 lines (56 loc) · 1.57 KB
/
category.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/**
* Comment Template.
*
* @todo Implement .this needs to be sorted out.
*
* Copyright (c) 2009 Carl Sutton ( dogmatic69 )
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
* @filesource
* @copyright Copyright (c) 2009 Carl Sutton ( dogmatic69 )
* @link http://www.dogmatic.co.za
* @package sort
* @subpackage sort.comments
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
* @since 0.5a
*/
class Category extends CmsAppModel
{
var $name = 'Category';
var $actsAs = array(
'Core.Sluggable',
'Core.Viewable',
'Tree'
);
var $order = array(
'Category.lft' => 'ASC'
);
var $validate = array(
'title' => array(
'notempty' => array( 'rule' => array( 'notempty' ) ),
),
);
var $belongsTo = array(
'Parent' => array(
'className' => 'Cms.Category',
'counterCache' => true
),
'Core.Group',
'Locker' => array(
'className' => 'Core.User',
'foreignKey' => 'locked_by',
'conditions' => '',
'fields' => array(
'Locker.id',
'Locker.username'
),
'order' => ''
)
);
var $hasMany = array(
'Cms.Content'
);
}
?>