示例#1
0
	protected function afterInit() {
		parent::afterInit();

		if ($this->getName() != 'scaffold')
			$this->cfg->name = $this->getName();

		if (!empty($this->cfg->name)) {
			$this->cfg->overload('module_scaffold_'.$this->cfg->name);

			$this->table = db::get('table', $this->cfg->name, array(
				'name'=>$this->cfg->name
			));
			$this->cols = $this->table->getCols();
			$this->related = array_keys($this->table->getRelated());
			$this->fields = $this->table->getField();
			$this->indexPage = request::uriDef(array('action'=>'', 'param'=>''));
		}

		$this->cfg->tplPrm = array(
			'layout'=>$this->cfg->layout,
			'module'=>'scaffold',
			'action'=>$this->cfg->name.ucfirst($this->cfg->viewAction),
			'defaultModule'=>'scaffold',
			'default'=>$this->cfg->viewAction,
			'cache'=>$this->cfg->cache
		);
	}
示例#2
0
 function __construct()
 {
     parent::__construct();
 }
示例#3
0
	/**
	 * Publish the module requested
	 *
	 * @return string The module published
	 */
	public static function publishModule() {
		self::initModule();
		return self::$module->publish();
	}
示例#4
0
 /**
  * 
  */
 function __destruct()
 {
     parent::__destruct();
 }