mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 14:07:25 +01:00
Optimized namespaces
This commit is contained in:
parent
011ef696f5
commit
ab15856aa4
@ -12,6 +12,7 @@ use App\Entity\Source\SourceInterface;
|
|||||||
use App\Creator\Factory\Template\Source\SourceTemplateFormFactory;
|
use App\Creator\Factory\Template\Source\SourceTemplateFormFactory;
|
||||||
use App\Creator\Factory\Form\Source\SourceFormFactory;
|
use App\Creator\Factory\Form\Source\SourceFormFactory;
|
||||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
|
use App\Entity\Source\AbstractSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo IMPLEMENT SECURITY!
|
* @todo IMPLEMENT SECURITY!
|
||||||
@ -26,8 +27,8 @@ class SourceController extends FOSRestController
|
|||||||
public function show(Request $request, int $id): Response
|
public function show(Request $request, int $id): Response
|
||||||
{
|
{
|
||||||
$source = $this->loadSource($request, $id);
|
$source = $this->loadSource($request, $id);
|
||||||
$assembler = $this->get(SourceDTOAssember::class);
|
#$assembler = $this->get(SourceDTOAssember::class);
|
||||||
$dto = $assembler->build($source, $this->getUser());
|
#$dto = $assembler->build($source, $this->getUser());
|
||||||
$view = $this->view($source, 200)
|
$view = $this->view($source, 200)
|
||||||
->setTemplate((new SourceTemplateFactory($source, $request))->getTemplatePath())
|
->setTemplate((new SourceTemplateFactory($source, $request))->getTemplatePath())
|
||||||
->setTemplateVar('source');
|
->setTemplateVar('source');
|
||||||
|
@ -7,7 +7,7 @@ use App\Entity\Source\SourceInterface;
|
|||||||
/**
|
/**
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
*/
|
*/
|
||||||
class AbstractSourceFactory
|
abstract class AbstractSourceFactory
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var SourceInterface
|
* @var SourceInterface
|
||||||
|
@ -4,7 +4,7 @@ namespace App\Creator\Factory\Template\Source;
|
|||||||
|
|
||||||
use App\Entity\Source\SourceInterface;
|
use App\Entity\Source\SourceInterface;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Creator\Factory\AbstractSourceFactory;
|
use App\Creator\Factory\AbstractSourceFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
|
@ -26,7 +26,7 @@ class UserSource extends AbstractSource implements UserSourceInterface
|
|||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Assert\Type(type="App\Entity\NameSource")
|
* @Assert\Type(type="App\Entity\Source\NameSource")
|
||||||
* @Assert\Valid()
|
* @Assert\Valid()
|
||||||
* @ORM\OneToOne(targetEntity="NameSource",cascade={"persist", "remove"})
|
* @ORM\OneToOne(targetEntity="NameSource",cascade={"persist", "remove"})
|
||||||
* @ORM\JoinColumn(name="name_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="name_id", referencedColumnName="id")
|
||||||
|
@ -6,7 +6,7 @@ use Symfony\Component\Form\AbstractType;
|
|||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use App\Entity\NameSource;
|
use App\Entity\Source\NameSource;
|
||||||
|
|
||||||
class NameSourceType extends AbstractType
|
class NameSourceType extends AbstractType
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user