本文整理汇总了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));
}