本文整理匯總了PHP中sfDoctrinePager::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP sfDoctrinePager::__construct方法的具體用法?PHP sfDoctrinePager::__construct怎麽用?PHP sfDoctrinePager::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sfDoctrinePager
的用法示例。
在下文中一共展示了sfDoctrinePager::__construct方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Construct method
* @param string $class Doctrine class name
* @param integer $maxPerPage Number of row per page
* @param array $options array of options
*/
public function __construct($class, $maxPerPage = 10, $options = array())
{
$this->widgetSchema = new sfWidgetPagerSchema();
$this->widgetSchema->setPager($this);
$this->options = $options;
$this->setup();
$this->validateRequiredOptions();
sfOutputEscaper::markClassesAsSafe(array('sfExtraDoctrinePager'));
parent::__construct($class, $maxPerPage);
}
示例2: __construct
public function __construct($class, $defaultMaxPerPage = 10, $count = 0, $independant_count = false)
{
parent::__construct($class, $defaultMaxPerPage);
$this->simpleQuery = clone $this->getQuery();
if ($independant_count) {
$this->countQuery = clone $this->getQuery();
} else {
$this->countQuery = $this->getQuery();
}
if ($count) {
$this->setNbResults($count);
}
}
示例3: __construct
/**
*
* @param string $class
* @param Doctrine_Query $query
* @param int $page
* @param string $route
* @param array $params
* @param bool $ajax
* @param int $maxPerPage
*/
public function __construct(Doctrine_Query $query, $page = 1, $route = null, $params = array(), $ajax = true, $maxPerPage = 10, $filter = null)
{
parent::__construct(null, $maxPerPage);
if ($filter) {
if ($filter instanceof policatFilterForm) {
if ($filter->isValid()) {
$query = $filter->filter($query);
$this->filter = $filter;
}
} else {
throw new Exception('filter must be of type policatFilterForm');
}
}
$this->setQuery($query);
$this->setPage($page);
$this->init();
$this->route = $route;
$this->params = $params;
$this->ajax = $ajax;
}
示例4: __construct
public function __construct($class = null, $maxPerPage = 10)
{
parent::__construct($class, $maxPerPage);
}
示例5: __construct
public function __construct($class, $ppm = 10)
{
parent::__construct($class, $ppm);
}
示例6: __construct
/**
* __construct
*
* @return void
*/
public function __construct($class, $defaultMaxPerPage = 10)
{
parent::__construct($class, $defaultMaxPerPage);
$this->setFinder(sfDoctrineFinder::from($class));
}