diff --git a/components/Posting/Controller/Post.php b/components/Posting/Controller/Post.php new file mode 100644 index 0000000000..5bf96d4a65 --- /dev/null +++ b/components/Posting/Controller/Post.php @@ -0,0 +1,45 @@ +. +// }}} + +namespace Component\Posting\Controller; + +use App\Core\Form; +use App\Core\Module; +use Symfony\Component\Form\Extension\Core\Type\FileType; +use Symfony\Component\Form\Extension\Core\Type\HiddenType; +use Symfony\Component\Form\Extension\Core\Type\SubmitType; +use Symfony\Component\HttpFoundation\Request; +use function App\Core\I18n\_m; + +class Post extends Module { + public function reply(Request $r) { + + $form = Form::create([ + ['avatar', FileType::class, ['label' => _m('Avatar'), 'help' => _m('You can upload your personal avatar. The maximum file size is 2MB.')]], + ['reply_to', HiddenType::class, []], + ['save', SubmitType::class, ['label' => _m('Submit')]], + ]); + + $form->handleRequest($request); + + if ($form->isSubmitted() && $form->isValid()) { + $data = $form->getData(); + $sfile = null; + } +} \ No newline at end of file