<?php
/**
 * 修改gii里一些生成controller的实现，使其符合爱购项目的需求
 * @author yzxh24
 */
Yii::import('system.gii.generators.controller.ControllerCode');

class iControllerCode extends ControllerCode
{
    public function prepare()
    {
        $this->files=array();
		$templatePath=$this->templatePath;

		$this->files[]=new CCodeFile(
			$this->controllerFile,
			$this->render($templatePath.'/controller.php')
		);

		foreach($this->getActionIDs() as $action)
		{
			$this->files[]=new CCodeFile(
				$this->getViewFile($action),
				$this->render($templatePath.'/view.php', array('action'=>$action))
			);
		}
    }
}