Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function actionSwitchEntry($type, $item_id, $menu_id) |
||
43 | { |
||
44 | BFrontendMenu::loadExtraModels(); |
||
45 | |||
46 | if( class_exists($type) && BFrontendMenu::model()->exists('id = :id', array(':id' => $menu_id)) ) |
||
47 | { |
||
48 | $menu = BFrontendMenu::model()->findByPk($menu_id); |
||
49 | $model = $type::model()->findByPk($item_id); |
||
50 | $menu->switchMenuEntryStatus($model); |
||
51 | } |
||
52 | } |
||
53 | } |