for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Kreta package.
*
* (c) Beñat Espiña <[email protected]>
* (c) Gorka Laucirica <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Kreta\Component\Comment\Form\Type;
use Kreta\Component\Core\Form\Type\Abstracts\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Class CommentType.
* @author Beñat Espiña <[email protected]>
* @author Gorka Laucirica <[email protected]>
class CommentType extends AbstractType
{
* {@inheritdoc}
public function buildForm(FormBuilderInterface $builder, array $options)
parent::buildForm($builder, $options);
$builder->add('description', 'textarea');
}
public function configureOptions(OptionsResolver $resolver)
parent::configureOptions($resolver);
$resolver->setRequired(['issue']);
public function getName()
return 'kreta_comment_comment_type';
protected function createEmptyData(FormInterface $form)
return $this->factory->create($this->options['issue'], $this->user);