diff --git a/src/AdminPanel/Form/ChoiceInput.php b/src/AdminPanel/Form/ChoiceInput.php new file mode 100644 index 0000000..ef3d551 --- /dev/null +++ b/src/AdminPanel/Form/ChoiceInput.php @@ -0,0 +1,15 @@ + AdminPanel::getInstance()->getEm()->getRepository($value)->findAll() + ); + } + return array( + $optionName => $value + ); + } + + public function getTemplate(): string + { + return "@AdminPanel/form/entity.twig"; + } +} diff --git a/src/AdminPanel/Form/Input.php b/src/AdminPanel/Form/Input.php new file mode 100644 index 0000000..a60e56e --- /dev/null +++ b/src/AdminPanel/Form/Input.php @@ -0,0 +1,32 @@ + $value); + } + + public function getTemplate(): string + { + return "@AdminPanel/form/text.twig"; + } +}