You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
final PagerFactory implements PagerFactoryInterface
{
public function create(string $pagerType): PagerInterface
{
switch ($pagerType) {
case Pager::TYPE_DEFAULT:
return new Pager();
case Pager::TYPE_SIMPLE:
/** @var SimplePager<ProxyQueryInterface<object>> $simplePager */
$simplePager = new SimplePager();
return $simplePager;
default:
throw new \RuntimeException(sprintf('Unknown pager type "%s".', $pagerType));
}
}
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Feature Request
A PagerFactory could be provided by this library:
then we could change the following code
https://github.com/sonata-project/SonataDoctrineORMAdminBundle/blob/4.x/src/Builder/DatagridBuilder.php#L147
to
And people will be able to support new pagerType or override the page easily.
The text was updated successfully, but these errors were encountered: