-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
roadiz-ci
committed
Jan 16, 2025
1 parent
d2ced30
commit 65291e6
Showing
8 changed files
with
51 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Themes\Rozier\AjaxControllers; | ||
|
||
use RZ\Roadiz\CoreBundle\Explorer\Event\ExplorerEntityListEvent; | ||
use RZ\Roadiz\CoreBundle\Explorer\ExplorerItemFactoryInterface; | ||
use RZ\Roadiz\CoreBundle\ListManager\EntityListManagerInterface; | ||
use Symfony\Component\Serializer\SerializerInterface; | ||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; | ||
|
||
abstract class AbstractAjaxExplorerController extends AbstractAjaxController | ||
{ | ||
public function __construct( | ||
protected readonly ExplorerItemFactoryInterface $explorerItemFactory, | ||
protected readonly EventDispatcherInterface $eventDispatcher, | ||
SerializerInterface $serializer, | ||
) { | ||
parent::__construct($serializer); | ||
} | ||
|
||
public function createEntityListManager(string $entity, array $criteria = [], array $ordering = []): EntityListManagerInterface | ||
{ | ||
$event = $this->eventDispatcher->dispatch(new ExplorerEntityListEvent($entity, $criteria, $ordering)); | ||
|
||
return parent::createEntityListManager($event->getEntityName(), $event->getCriteria(), $event->getOrdering()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters