<?php
namespace App\Form;

use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;

/**
 * Form for adding new workspace
 */
class WorkspaceAddForm extends AbstractFormManager
{

    /**
     * {@inheritdoc}
     */
    public function getTemplate(): string
    {
        return '_includes/html/form/workspaceAdd.html.twig';
    }

    /**
     * {@inheritdoc}
     */
    protected function addFields($formBuilder, $options): void
    {
        $formBuilder->add('name', TextType::class, [
            'required' => true
        ])->add('submit', SubmitType::class);
    }
}