<?php
namespace AdminBundle\Admin\Document;
use AdminBundle\Admin\BaseAdmin;
use Sonata\AdminBundle\Route\RouteCollectionInterface;
class BranchesAdmin extends BaseAdmin
{
protected $baseRouteName = 'document_branch';
protected $baseRoutePattern = 'document_branch_action';
/**
* @param RouteCollectionInterface $collection
*/
protected function configureRoutes(RouteCollectionInterface $collection): void
{
$collection->add('branch_offers_list', $this->getRouterIdParameter() . '/offers/list');
$collection->add('branch_offers_create', $this->getRouterIdParameter() . '/offers/create');
$collection->add('document_qr_test', 'branch/qr_test');
$collection->add('session_token_invalidate', 'document/token_invalidate');
$collection->add('document_get_qr_test', 'document/{branchId}/qr_test/' . $this->getRouterIdParameter());
$collection->add(
'document_get_json_qr_test',
'document/{branchId}/qr_test/json/' . $this->getRouterIdParameter()
);
$collection->add('branch_list', 'list_branches');
$collection->add(
'branch_offers_delete',
'branch/{branchId}/offers/delete/' . $this->getRouterIdParameter()
);
$collection->add('document_test_upload', 'branch/document/test/callback');
$collection->add('document_sync', 'branch/document/offers/sync');
}
protected function configure(): void
{
parent::configure(); // TODO: Change the autogenerated stub
$this->setTemplate('list', '@Admin/document/list-branches.html.twig');
}
}