mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized CreateSourceAction
This commit is contained in:
@@ -60,6 +60,7 @@ final class CreateSourceAction extends AbstractCreateAction
|
||||
$this->setSourceClass();
|
||||
$this->setRequestedEntityClass();
|
||||
$this->setForm();
|
||||
$this->handleRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,6 +85,5 @@ final class CreateSourceAction extends AbstractCreateAction
|
||||
*/
|
||||
protected function proccess()
|
||||
{
|
||||
$this->prepare();
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Form\Source;
|
||||
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
@@ -8,14 +9,11 @@ use App\Attribut\SlugAttributInterface;
|
||||
use App\Attribut\ClassAttributInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class PureSourceCreateType extends SourceType
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Symfony\Component\Form\AbstractType::buildForm()
|
||||
@@ -25,18 +23,19 @@ final class PureSourceCreateType extends SourceType
|
||||
$builder
|
||||
->add(SlugAttributInterface::SLUG_ATTRIBUT_NAME)
|
||||
->add(ClassAttributInterface::CLASS_ATTRIBUT_NAME, SourceType::class, [
|
||||
'mapped' => false
|
||||
'mapped' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Symfony\Component\Form\AbstractType::configureOptions()
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => PureSource::class
|
||||
'data_class' => PureSource::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user