DefaultController.php 1.81 KiB
<?php declare(strict_types=1);
/*
 * irstea/file-upload-bundle - Bundle de gestion de fichiers intégrée à Symfony et Twitter-Bootstrap.
 * Copyright (C) 2015-2020 Irstea <dsi.poleis.contact@lists.irstea.fr>
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option) any
 * later version.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License and the GNU
 * Lesser General Public License along with this program. If not, see
 * <https://www.gnu.org/licenses/>.
namespace Irstea\FileUploadBundle\Tests\Fixtures\App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
/**
 * Class DefaultController.
class DefaultController extends Controller
    public function __construct()
    /**
     * @Route("/", name="home")
    public function indexAction()
        return $this->render('index.html.twig');
    /**
     * @Route("/showcase", name="showcase")
    public function fileuploadAction(Request $request)
        $builder = $this->get('form.factory')->createBuilder(FormType::class);
        $form = $builder->getForm();
        return $this->render(
            'show-case.html.twig',
                'form' => $form->createView(),