Actualización

This commit is contained in:
Xes
2025-04-10 12:24:57 +02:00
parent 8969cc929d
commit 45420b6f0d
39760 changed files with 4303286 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace Test\Mock;
use Knp\Component\Pager\Event\ItemsEvent;
use Knp\Component\Pager\Event\Subscriber\Paginate\ArraySubscriber;
class CustomParameterSubscriber extends ArraySubscriber
{
static function getSubscribedEvents()
{
return array(
'knp_pager.items' => array('items', 10)
);
}
function items(ItemsEvent $e)
{
$e->setCustomPaginationParameter('test', 'val');
parent::items($e);
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Test\Mock;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Knp\Component\Pager\Event\PaginationEvent;
use Knp\Component\Pager\Pagination\SlidingPagination;
class PaginationSubscriber implements EventSubscriberInterface
{
static function getSubscribedEvents()
{
return array(
'knp_pager.pagination' => array('pagination', 0)
);
}
function pagination(PaginationEvent $e)
{
$e->setPagination(new SlidingPagination);
$e->stopPropagation();
}
}