<?php

require_once dirname(dirname(dirname(__FILE__))) . '/class/core/ActionBase.class.php';

class Xoonips_AdminMenuAction extends Xoonips_ActionBase {
	protected function doInit(&$request, &$response) {

		// load menu
		require dirname(dirname(__FILE__)) . '/menu.php';

		$menu = array();
		foreach ( $adminmenu as $item ) {
			$menu[] = array(
		    'label' => $item['title'],
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/'.$item['link'],
			);
		}

		// get common viewdata
		$viewData = array();

		$viewData['menu'] = $menu;
		
		$response->setViewData($viewData);
		$response->setForward('init_success');
		return true;
	}
}
?>
