<?php

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

class Xoonips_PolicyItemMenuAction extends Xoonips_ActionBase {

	protected function doInit(&$request, &$response) {

		// breadcrumbs
		$breadcrumbs = array(
  		array(
		    'name' => _AM_XOONIPS_TITLE,
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/index.php',
  		),
		array(
		   	'name' => _AM_XOONIPS_POLICY_TITLE,
		    'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/policy.php',
		),
		array(
		    'name' => _AM_XOONIPS_POLICY_ACCOUNT_TITLE,
		),
		);

		// menu
		$menu = array(
		  	array(
		    	'label' => _AM_XOONIPS_POLICY_ACCOUNT_INITIAL_TITLE,
		    	'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/policy_user.php',
		  	),
			array(
		   	'label' => _AM_XOONIPS_POLICY_ACCOUNT_GROUP_TITLE,
    			'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/policy_userfieldgroup.php',
  			),
		  	array(
		   	'label' => _AM_XOONIPS_POLICY_ACCOUNT_DETAIL_TITLE,
    			'url' => XOOPS_URL.'/modules/'.$this->dirname.'/admin/policy_userfield.php',
  			),
		);

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

		$viewData['menu'] = $menu;
		$viewData['breadcrumbs'] = $breadcrumbs;

		$response->setViewData($viewData);
		$response->setForward('init_success');

		return true;
	}
}

