我的问题是:有没有可能以相反的顺序轻松地为SF2创建WhiteOctoberPagerFantaBundle?
我的意思是,当我们通常有分页时: 1,2,3(1页上的最新内容) ->:241,240,239,...(最新内容在241)。
谢谢。
发布于 2014-07-08 05:12:26
不,这不可能。我只是看了一下PagerFanta源代码,页面位置是硬编码的。
private function generatePages()
{
$this->calculateStartAndEndPage();
return $this->previous().
$this->first().
$this->secondIfStartIs3().
$this->dotsIfStartIsOver3().
$this->pages().
$this->dotsIfEndIsUnder3ToLast().
$this->secondToLastIfEndIs3ToLast().
$this->last().
$this->next();
}也许可以通过编辑这部分代码,在“内爆”元素之前将它们存储为数组,并添加一个reverse选项,如果为真,将在结果上生成一个array_reverse……
https://stackoverflow.com/questions/24619575
复制相似问题