Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -12,30 +12,25 @@ namespace App\Form\Extension;
|
||||
use App\Form\Helper\ToolbarHelper;
|
||||
use App\Form\Toolbar\ExportToolbarForm;
|
||||
use App\Form\Toolbar\InvoiceToolbarForm;
|
||||
use App\Form\Toolbar\InvoiceToolbarSimpleForm;
|
||||
use App\Form\Toolbar\TimesheetExportToolbarForm;
|
||||
use App\Form\Toolbar\TimesheetToolbarForm;
|
||||
use App\Form\Toolbar\UserToolbarForm;
|
||||
use App\Reporting\MonthlyUserListForm;
|
||||
use App\Reporting\WeeklyUserListForm;
|
||||
use App\Reporting\YearlyUserListForm;
|
||||
use App\Reporting\MonthlyUserList\MonthlyUserListForm;
|
||||
use App\Reporting\WeeklyUserList\WeeklyUserListForm;
|
||||
use App\Reporting\YearlyUserList\YearlyUserListForm;
|
||||
use Symfony\Component\Form\AbstractTypeExtension;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final class ToolbarFormExtension extends AbstractTypeExtension
|
||||
{
|
||||
private $toolbarHelper;
|
||||
|
||||
public function __construct(ToolbarHelper $toolbarHelper)
|
||||
public function __construct(private ToolbarHelper $toolbarHelper)
|
||||
{
|
||||
$this->toolbarHelper = $toolbarHelper;
|
||||
}
|
||||
|
||||
public static function getExtendedTypes(): iterable
|
||||
{
|
||||
return [
|
||||
InvoiceToolbarForm::class,
|
||||
InvoiceToolbarSimpleForm::class,
|
||||
ExportToolbarForm::class,
|
||||
TimesheetToolbarForm::class,
|
||||
TimesheetExportToolbarForm::class,
|
||||
@@ -46,7 +41,7 @@ final class ToolbarFormExtension extends AbstractTypeExtension
|
||||
];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$this->toolbarHelper->cleanupForm($builder);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user