parent
d79a160547
commit
a9f0aa6bcd
|
@ -80,7 +80,7 @@ class Limiter extends AbstractWidget
|
||||||
$navigation = new Navigation();
|
$navigation = new Navigation();
|
||||||
$navigation->setLayout(Navigation::LAYOUT_TABS);
|
$navigation->setLayout(Navigation::LAYOUT_TABS);
|
||||||
foreach (static::$limits as $limit => $label) {
|
foreach (static::$limits as $limit => $label) {
|
||||||
$navigationItem = new NavigationItem();
|
$navigationItem = new NavigationItem($limit);
|
||||||
$navigationItem
|
$navigationItem
|
||||||
->setActive($activeLimit === $limit)
|
->setActive($activeLimit === $limit)
|
||||||
->setAttribute(
|
->setAttribute(
|
||||||
|
@ -90,17 +90,15 @@ class Limiter extends AbstractWidget
|
||||||
$limit
|
$limit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
->setId($limit)
|
|
||||||
->setLabel($label)
|
->setLabel($label)
|
||||||
->setUrl($url->with(array('limit' => $limit)));
|
->setUrl($url->with(array('limit' => $limit)));
|
||||||
$navigation->addItem($navigationItem);
|
$navigation->addItem($navigationItem);
|
||||||
}
|
}
|
||||||
if ($activeLimit === 0) {
|
if ($activeLimit === 0) {
|
||||||
$navigationItem = new NavigationItem();
|
$navigationItem = new NavigationItem(0);
|
||||||
$navigationItem
|
$navigationItem
|
||||||
->setActive(true)
|
->setActive(true)
|
||||||
->setAttribute('title', t('Show all items on this page'))
|
->setAttribute('title', t('Show all items on this page'))
|
||||||
->setId(0)
|
|
||||||
->setLabel(t('all'));
|
->setLabel(t('all'));
|
||||||
$navigation->addItem($navigationItem);
|
$navigation->addItem($navigationItem);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue