Location: PHPKode > projects > PhpCodeGenie > phpCodeGenie3.0.2/app/generators/php/plugins/genieDbFrameworkGenerator/webComponentGenerator/genieWebDeleteScriptGenerator.plugin.class.php
<? 
include_once("genieConfiguration.inc.php");
include_once(CLASS_TABLE);
include_once(CLASS_COMMON_GENIE_FRAMEWORK);
?>
<? 
class genieWebDeleteScriptGenerator extends commonGenieFramework
{

	function genieWebDeleteScriptGenerator($arguments)
	{
		$db = $arguments['db'];
		$table = $arguments['table'];

		$thisTable = new table($table,$db);
		$this->setTableObject($thisTable);


		$this->initializeGenieFramework();

	}


	function generate()
	{
		$this->appendSuperHeader();
		$this->appendWebHeader();

		
		$this->buildGetInfoById();
		$this->generateDelete();
		$this->appendWebFooter();

		return $this->getSourceCode();
	}

	function generateDelete()
	{
		$thisTable = $this->getTableObject();

		$thisInfoName = "\$this".ucfirst($thisTable->getTableName()).ucfirst(strtolower(NAME_DATA_CONTAINER));

		$code = "";
		$code .= $this->getCodeStarter();
		$code .= $this->getCodeTab()."\$this".ucfirst($thisTable->getTableName()).ucfirst(strtolower(NAME_MANAGER))."->delete".ucfirst($thisTable->getTableName())."(".$thisInfoName.");".$this->getLineEnder();

		$code .= $this->getCodeEnder();
		$code .= $this->getLineEnder();
		$code .= "<br><b>".LANG_ADVANCED_RECORD_DELETED_PERMANENTLY."<br><br></b>";
		$code .= $this->getLineEnder();
		$this->buildBackToListAll();
		$this->appendToCode($code);


	}



}

?>
Return current item: PhpCodeGenie