gist/src/Gist/Form/DeleteGistForm.php

43 lines
735 B
PHP
Raw Normal View History

<?php
namespace Gist\Form;
use Symfony\Component\Validator\Constraints\NotBlank;
/**
2016-11-13 00:44:23 +01:00
* Class DeleteGistForm.
*
* @author Simon Vieille <simon@deblan.fr>
*/
class DeleteGistForm extends AbstractForm
{
2016-11-13 00:44:23 +01:00
/**
* {@inheritdoc}
*/
public function build(array $options = array())
{
$this->builder->add(
'id',
'hidden',
array(
'required' => true,
'constraints' => array(
new NotBlank(),
),
)
);
2016-11-13 00:44:23 +01:00
$this->builder->setMethod('POST');
2016-11-13 00:44:23 +01:00
return $this->builder;
}
2016-11-13 00:44:23 +01:00
/**
* {@inheritdoc}
*/
public function getName()
{
return 'delete';
}
}