本文整理匯總了PHP中Generic::cud方法的典型用法代碼示例。如果您正苦於以下問題:PHP Generic::cud方法的具體用法?PHP Generic::cud怎麽用?PHP Generic::cud使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Generic
的用法示例。
在下文中一共展示了Generic::cud方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
<?php
// _genericEdit.php
//$__isSiteBuilderPage = true;
require_once '../setup.inc.php';
$requestedAction = 'edit';
$pageLocation = '1';
$browserTitle = 'Generic Edit Form';
$timers = array();
$wo = new WOOOF();
if (!$wo->constructedOk) {
$wo->handleShowStopperError("1000 Failed to init WOOOF.");
}
Timer::restart();
$paramNames = array('_tableName', '_id', '_action', '_viewButton', '_editButton', '_deleteButton', '_doAction', '_showDetails', 'fragmentsFile', 'listURL');
$in = $wo->getMultipleGetPost($paramNames);
$tableName = $in['_tableName'];
$table = new Generic($tableName, $wo);
$tpl = $table->cud($in);
if ($tpl === FALSE) {
// $wo->handleShowStopperError( $error );
$tpl = array('browserTitle' => $browserTitle, 'content' => 'Sorry, smg went wrong', 'errorMessage' => nl2br($wo->getErrorsAsStringAndClear()), 'message' => '');
} else {
if (!isset($tpl['browserTitle'])) {
$tpl['browserTitle'] = $tableName . ' ' . $browserTitle;
}
}
Timer::stopSave($timers, "_genericEdit.php for {$tableName}");
$wo->fetchApplicationFragment('structural/generic_template.php');
/* End of file genericEdit.php */