本文整理匯總了PHP中sfPropelPager::setMaxPerPage方法的典型用法代碼示例。如果您正苦於以下問題:PHP sfPropelPager::setMaxPerPage方法的具體用法?PHP sfPropelPager::setMaxPerPage怎麽用?PHP sfPropelPager::setMaxPerPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sfPropelPager
的用法示例。
在下文中一共展示了sfPropelPager::setMaxPerPage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: executeMetadata
/** Action that is called if only metadata query is done
*/
public function executeMetadata(sfWebRequest $request)
{
$this->getContext()->getConfiguration()->loadHelpers('Url');
$files = NULL;
// get request parameters
$metadataquery = $request->getParameter('metadataquery');
$limit = $request->getParameter('limit', $this->getContext()->getConfiguration()->getSmintMaxQueryResults());
$id_prefix = $request->getParameter('id_prefix', '');
$featurevectortypeid = sfConfig::get('app_defaults_featurevectortypeid', 0);
$page = $request->getParameter('page', 1);
mysfLog::logRequest($this, $request);
$relatedCriteria = $this->buildQuery($metadataquery, $limit);
mysfLog::log($this, $relatedCriteria->toString());
$filespager = new sfPropelPager('Filedesc');
$filespager->setPage($page);
$filespager->setCriteria($relatedCriteria);
$filespager->setMaxPerPage($limit);
$filespager->init();
$seedLabel = null;
$seedlabel_topleft = 'Search for ' . $metadataquery;
$aSegmSearch['enabled'] = false;
return $this->renderPartial('search/result', array('render' => 'results', 'seedLabel' => $seedLabel, 'seedlabel_topleft' => $seedlabel_topleft, 'id_prefix' => $id_prefix, 'limit' => $limit, 'metadataquery' => $metadataquery, 'filespager' => $filespager, 'aSegmSearch' => $aSegmSearch));
}