本文整理匯總了PHP中SearchForm::initData方法的典型用法代碼示例。如果您正苦於以下問題:PHP SearchForm::initData方法的具體用法?PHP SearchForm::initData怎麽用?PHP SearchForm::initData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SearchForm
的用法示例。
在下文中一共展示了SearchForm::initData方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: editSearch
function editSearch($args)
{
$this->validate();
$rtDao =& DAORegistry::getDAO('RTDAO');
$journal = Request::getJournal();
$versionId = isset($args[0]) ? $args[0] : 0;
$version =& $rtDao->getVersion($versionId, $journal->getId());
$contextId = isset($args[1]) ? $args[1] : 0;
$context =& $rtDao->getContext($contextId);
$searchId = isset($args[2]) ? $args[2] : 0;
$search =& $rtDao->getSearch($searchId);
if (isset($version) && isset($context) && isset($search) && $context->getVersionId() == $version->getVersionId() && $search->getContextId() == $context->getContextId()) {
import('classes.rt.ojs.form.SearchForm');
$this->setupTemplate(true, $version, $context, $search);
$searchForm = new SearchForm($searchId, $contextId, $versionId);
$searchForm->initData();
$searchForm->display();
} else {
Request::redirect(null, null, 'searches', array($versionId, $contextId));
}
}
示例2: editSearch
function editSearch($args)
{
$this->validate();
$rtDao =& DAORegistry::getDAO('RTDAO');
$archiveId = array_shift($args);
$versionId = array_shift($args);
$contextId = array_shift($args);
$searchId = array_shift($args);
$version =& $rtDao->getVersion($versionId, $archiveId);
$context =& $rtDao->getContext($contextId);
$search =& $rtDao->getSearch($searchId);
if (isset($version) && isset($context) && isset($search) && $context->getVersionId() == $version->getVersionId() && $search->getContextId() == $context->getContextId()) {
import('classes.rt.harvester2.form.SearchForm');
$this->setupTemplate(true, $archiveId, $version, $context, $search);
$searchForm = new SearchForm($searchId, $contextId, $versionId, $archiveId);
$searchForm->initData();
$searchForm->display();
} else {
Request::redirect(null, 'searches', array($archiveId, $versionId, $contextId));
}
}