[go: up one dir, main page]

Menu

[r10]: / app / models / menu.php  Maximize  Restore  History

Download this file

53 lines (52 with data), 1.3 kB

 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
<?php
class Menu extends AppModel {
var $name = 'Menu';
var $displayField = 'name';
var $actsAs = array('WhoDidIt');
var $order = array('parent_id','sort_order');
//The Associations below have been created with all possible keys, those that are not needed can be removed
var $belongsTo = array(
'ParentMenu' => array(
'className' => 'Menu',
'foreignKey' => 'parent_id',
'conditions' => '',
'fields' => array('id','name'),
'order' => ''
),
'Group' => array(
'className' => 'Group',
'foreignKey' => 'group_id',
'conditions' => '',
'fields' => array('id','name'),
'order' => ''
),
'CreatedBy' => array(
'className' => 'User',
'foreignKey' => 'created_by',
'fields' => array('id','name')
),
'ModifiedBy' => array(
'className' => 'User',
'foreignKey' => 'modified_by',
'fields' => array('id','name')
)
);
/*
var $hasMany = array(
'ChildMenu' => array(
'className' => 'Menu',
'foreignKey' => 'parent_id',
'dependent' => false,
'conditions' => '',
'fields' => array('id','name'),
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
*/
}
?>